Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: add option to relay Discord bots to IRC #71

Open
poVoq opened this issue Sep 17, 2022 · 4 comments
Open

Feature request: add option to relay Discord bots to IRC #71

poVoq opened this issue Sep 17, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@poVoq
Copy link

poVoq commented Sep 17, 2022

Any chance for the bridge to also relay messages from other bots? Maybe optional?

Because right now it seems to totally ignore them.

We have a channel where someone else also set up a Matrix to Discord bridge and messages coming in through that bridge are totally ignored. However the Matrix bridge seems to see the bot users from dibridge fine, so I guess that means it is possible to enable it the other way around too.

grafik

Thanks!

@TrueBrain
Copy link
Member

The bridge indeed ignores every Discord bot; this has two reasons.

First of all, it prevents any possibility of a bot-loop, where 2 bots start talking to each other never shutting up.

But more importantly, the way the bridging works: it uses the Discord username (not the nickname) to generate an IRC username. As you cannot change your username (only your nickname), this means usernames on IRC are the same for the same person on Discord, also over time.
With bots you don't have this possibility (as the bot only has a single username). We would have to take the nickname as IRC username, making it very easy to flood the IRC with tons of puppets if someone knows about this behaviour. Or otherwise the bot would get a single puppet on IRC, which would be confusing as fuck for anyone :P

Writing this logic would be tricky, and most likely it would mean you need to whitelist bots. Either way, it is far from a trivial job. An in-between solution would be to let bots talk in a non-puppet way, where they are like: matrix: <nomagno> I see poVoq#0000, assuming the bot's name is matrix.

For your usecase, however, it might be far better to bridge the Matrix room onto IRC itself, instead of bouncing it via Discord. In your suggestion, you get Matrix -> Discord -> IRC. But better might be to do Matrix -> Discord, Matrix -> IRC, Discord -> IRC. That way we avoid all of the above.
This however results in a feature request to allow ignoring certain users on IRC, as otherwise IRC would relay it again to Discord. But at least that is far easier to implement.

Either way, effort is required to build this. Personally, I don't have the time for this in the next few weeks / months, but I can see either route as a good addition to this bridge.

@poVoq
Copy link
Author

poVoq commented Sep 17, 2022

An in-between solution would be to let bots talk in a non-puppet way, where they are like: matrix: I see poVoq#0000, assuming the bot's name is matrix.

That seems like a good temporary fix if it isn't too much effort to implement.

Bridging directly to Matrix might indeed work, but yeah as long as the other bridge still runs (and the Discord guild owner is unlikely to disabled it) this would result in issues if the bot isn't ignored as you write.

@TrueBrain TrueBrain changed the title Messages from other bots are not relayed Feature request: add option to relay Discord bots to IRC Sep 30, 2022
@TrueBrain TrueBrain added the enhancement New feature or request label Sep 30, 2022
@Mailaender
Copy link

Mailaender commented Apr 2, 2023

For @OpenHV I created https://github.com/OpenHV/HardVacuumRobot which announces games and parses replays. Not relaying it makes a matchmaking channel a bit pointless. Maybe allow this as an optional feature?

@TrueBrain
Copy link
Member

I believe that is what I suggested with my earlier reply ;) We just need someone willing to put in the effort :) PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants