IRC: a capability that arrives after connect is never taken up #176

Closed
opened 2026-09-11 22:25:53 -04:00 by Salastil · 1 comment
Owner

CAP LS 302 is what moho sends (nobilis/src/backend/irc/connect.rs:614), and asking
for version 302 turns on cap-notify implicitly - the server is then entitled to send
CAP NEW when something becomes available and CAP DEL when it goes away.

Only CAP ACK is matched (nobilis/src/backend/irc/incoming.rs:629). NEW and DEL
fall through the router and nothing happens.

So the capability set is whatever was true in the first second of the connection, for
the life of the connection. Services coming back up and offering SASL again, a network
enabling draft/chathistory, an operator turning something off - none of it is noticed.
The DEL half is the worse one: moho goes on believing it holds a capability the server
has withdrawn, and keeps using it.

HexChat, WeeChat and Halloy all act on both.

`CAP LS 302` is what moho sends (`nobilis/src/backend/irc/connect.rs:614`), and asking for version 302 turns on `cap-notify` implicitly - the server is then entitled to send `CAP NEW` when something becomes available and `CAP DEL` when it goes away. Only `CAP ACK` is matched (`nobilis/src/backend/irc/incoming.rs:629`). `NEW` and `DEL` fall through the router and nothing happens. So the capability set is whatever was true in the first second of the connection, for the life of the connection. Services coming back up and offering SASL again, a network enabling `draft/chathistory`, an operator turning something off - none of it is noticed. The `DEL` half is the worse one: moho goes on believing it holds a capability the server has withdrawn, and keeps using it. HexChat, WeeChat and Halloy all act on both.
Salastil added the feature label 2026-09-11 22:25:53 -04:00
Author
Owner
Finished — https://git.salastil.com/Salastil/nobilis/commit/e8e3c6f Bump: https://git.salastil.com/Salastil/moho/commit/0fb0d1a
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#176