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

Bot repeatedly kicked from Libera-bridged room (IRC) #264

Open
simonmichael opened this issue Jun 8, 2023 · 3 comments
Open

Bot repeatedly kicked from Libera-bridged room (IRC) #264

simonmichael opened this issue Jun 8, 2023 · 3 comments
Labels
T-Other Questions, user support, anything else.

Comments

@simonmichael
Copy link

simonmichael commented Jun 8, 2023

Thanks for this, it's awesome!

Since first viewing, https://archive.matrix.org/r/hledger:matrix.org/date/2023/06/08 and chat clients show the archive bot repeatedly joining and being kicked by appservice. I assume it's because this room is plumbed to a Libera IRC channel ? What is the proper fix for this ?

@MadLittleMods MadLittleMods added the T-Other Questions, user support, anything else. label Jun 8, 2023
@MadLittleMods
Copy link
Contributor

MadLittleMods commented Jun 8, 2023

IRC bridge behavior is also being touched on in #260. The appservice removed @archive:matrix.org: IRC connection failure. behavior might be explained by the following explanation around enforcing Matrix users to be connected to IRC and the kickOn.ircConnectionFailure config being enabled by the IRC bridge:

I have a personal suspicion that this issue may be caused by bots that follow mentions of rooms and attempt to join every room they see. They have likely exceeded the Libera.Chat limit of 250 channels and thus the bridge fails to join them on Libera.Chat and the bridge as a privacy measure stops relaying messages until it decides to kick the bot.

-- matrix-org/matrix-appservice-irc#1474 (comment)

It seems like you're happy for the @archive:matrix.org bot stick around and it seems like you can disable this functionality on a per-room basis according to the docs -> https://matrix-org.github.io/matrix-appservice-irc/latest/administrators_guide.html#enforcing-matrix-users-to-be-connected-to-irc (edit the org.matrix.appservice-irc.config state event in your room)

But it looks like you already have org.matrix.appservice-irc.config set with allowUnconnectedMatrixUsers: true though so I'm not sure why you're still seeing this happen 🤔

I'm not a matrix-appservice-irc expert to know the details here. Perhaps matrix-org/matrix-appservice-irc#1589. You can also try asking in #irc:matrix.org. Please report back with your findings!

Also related to matrix-org/matrix-appservice-irc#1268

@MadLittleMods MadLittleMods changed the title bot repeatedly kicked from Libera-bridged room Bot repeatedly kicked from Libera-bridged IRC room Jun 8, 2023
@MadLittleMods MadLittleMods changed the title Bot repeatedly kicked from Libera-bridged IRC room Bot repeatedly kicked from Libera-bridged room (IRC) Jun 8, 2023
@Half-Shot
Copy link

Half-Shot commented Jun 9, 2023

This is unfortunately intentional as the bot was banned from the libera.chat irc network. In these cases we have to act and forbid the bot from joining rooms connected to the network.

For what it's worth, we've had to ban the archive bot on the bridge because it joined too many rooms. The IRC bridge (at least, the libera.chat bridge) requires that all Matrix-side users are joined to the IRC channels they are bridged to.

However, most IRC networks will limit how many channels one user may join at any time. The bot exceeded this value and the result was the bridge became very unstable. We're hoping there might be a solution to this problem at some point because I believe the archive provides value to some users of the bridge, but ultimately in it's present incarnation it's not suitable.

-- #47 (comment)

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Jun 9, 2023

@Half-Shot Any suggestion on how we can solve the IRC join limit problem?

Someone suggested leaving rooms after the archive hasn't checked for a while but since the app is stateless, it's not possible to see when the archive bot last accessed a room to compare against the join date (and no Matrix API for that kind of info). Plus, no amount of tuning the idle window will be edge case free because lots of people can join many rooms in a short amount of time. It also doesn't help that there is no Matrix API to get a list of joined rooms besides /sync which is slow and returns more info than necessary if we wanted to add an hourly task to prune things or a FIFO of libera.chat rooms.

It seems like the number of joined rooms is being tracked in the IRC bridge itself, so perhaps it might be better tackled there instead. Plus this kind of join limit logic is specific to the bridge.

And for rooms which are Matrix-first, some solution to matrix-org/matrix-appservice-irc#1268 would probably cover this exact case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Other Questions, user support, anything else.
Projects
None yet
Development

No branches or pull requests

3 participants