-
-
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
UHNAMES Race Condition #2289
Comments
I can see a quick fix, that would probably be a safe fix as well: try/catch. |
The best solution would simply prevent sending any JOINs until after 005 has been processed. I would love to just move a bunch of startup tasks from 001 to 251, but unfortunately the latter is no longer required. We could move joining channels to a new handler that triggers on 376 (RPL_ENDOFMOTD) or 422 (ERR_NOMOTD), since the server "MUST" send either the MOTD or 422 after 001-005. We already constrain ISUPPORT handling to happen on the main thread, so that should block until after The advantage of triggering JOINs and such on 001 is that it's existed in the spec for ages. As unlikely as it would be to encounter an IRCd that doesn't send 005, or doesn't send the MOTD automatically after registration, it's far more unlikely to find a server that doesn't send 001—that would completely break the protocol, as I understand it. As an aside, I have no idea why this rule exists on the 005 handler. It shouldn't be necessary. Though I guess it's a guard against super outdated IRCds that still use 005 as RPL_BOUNCE, per RFC 2812. |
That shouldn't be too much of a trouble, right? Right... I'll try. |
So, hm... you're not going to believe that: it's stupidly simple. All I have to do is move a portion of the code into its own plugin callable in |
@half-duplex I invite you to take a look at #2321 as it should fix this issue, however I don't have a server to test the PR against. |
Description
When Sopel joins a server that supports UHNAMES but not the userhost-in-names CAP, it sends
PROTOCTL UHNAMES
to accomplish the same goal.In my testing, this results in:
Followed by an exception (expected 2 to unpack, got 1) on coretasks.py:524
Sending
PROTOCTL UHNAMES
before theJOIN
seems to work.The same problem may exist with the CAP, if not in practice, than in theory.
Previously: #2102
Reproduction steps
Expected behavior
Joins without exception
Environment
.version
: 36b7c2f/version
: InspIRCd 2Notes
@dgw broke it
The text was updated successfully, but these errors were encountered: