-
-
Notifications
You must be signed in to change notification settings - Fork 405
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 does not rejoin channels reliably after a netsplit #1335
Comments
Even "someone more in tune with the IRC protocol" can't do anything about this without raw logs of what's happening between Sopel and the IRC server. |
The bot recognises that something is wrong and initiates a reconnect
The expected message after the JOIN would be:
Due to the state of the network, joining a channel is not possible at the time of the connection. |
I think EFNet is one of very few networks that lock channels during a netsplit. Most IRCds (AFAIK) just let users on the lost segment join channels anyway and resolve ops collisions with timestamps and/or services. Adding this sort of logic to core doesn't seem especially worthwhile. For the majority of users, it would just waste CPU time. Once restarting (#1333) is done, a plugin could probably do it though. Or, run Sopel behind a bouncer (ZNC?) and let the bouncer handle channel joining and retries for free. |
Handling numeric 437 ( I don't think there are any situations where Sopel would receive a 437 for something that isn't a channel, but this feature would definitely need someone to commit to testing it on a network that handles netsplits this way for some time before release. I'm not in a position to do so, realistically. |
Punting relatively minor enhancement with an existing workaround. |
I suggest to punt even further, to Sopel 8.x. |
Belatedly, I agree. |
Let's consider this part of the |
From reading this conversation, it feels like Sopel could:
|
Logging a 437 seems like about the only sane option, since different IRCds use it for conflicting things (RFC 2812 = ERR_UNAVAILRESOURCE, ircu and possibly others = ERR_BANNICKCHANGE). I wonder how Sopel would get a 404 ERR_CANNOTSENDTOCHAN if it couldn't rejoin the channel in the first place? With rare exceptions (like reminders from If eventual consistency is OK, maybe there's also some mechanism that Sopel could use to make sure it's actually joined to all the channels it expects, using a self-WHO or something like that. (I'm not a fan of this idea because it sounds fairly complicated and potentially fragile, but it is a possibility.) |
Another idea, maybe better: If Sopel receives 437 and is not in one or more of the I'm loosely thinking of ZNC's behavior, where if it can't join a channel it will retry several times before logging a message and disabling future join attempts. (I don't think Sopel should quit trying to join the channel forever, e.g. after a restart it should try joining every channel in the settings again.) If I shamelessly take a look at what another bot (Limnoria) does, I its Admin plugin, |
It works most of the time but often enough it doesn't. Maybe this is the responsibility of the network?
In any case, someone more in tune with the IRC protocol might have an elegant way of making sure the bot stays in the channel(s).
The text was updated successfully, but these errors were encountered: