On the IRC listener, handleQuit read the user's QUIT reason but used it only in the ERROR :Closing Link line. cleanup then sent peers a QUIT with the fixed reason Connection closed. Peers on both transports never saw the reason. This fixes #216.
What changed:
Each IRC connection keeps the reason for its QUIT, which starts as Connection closed.
handleQuit replaces it with the user's reason, or Client quit when none is given.
cleanup passes it to svc.BroadcastQuit, the same service call the HTTP API's QUIT uses.
What a reader might trip over:
TestRelayNickDiffersOnlyInCase expected Connection closed for a bare QUIT. That was the bug, so it now expects Client quit.
In the new test, the HTTP API peer is a session created in the database and joined to the channel, as TestStopEndsSessions already does.
Disclosures:
Judgement call: handleQuit records the reason and cleanup sends it, rather than handleQuit calling BroadcastQuit itself as the HTTP API handler does. cleanup already ends the session for every connection, and a QUIT before registration has no session to end.
Judgement call: QUIT : with an empty reason sends peers an empty reason, as the HTTP API does for an empty body. IRC peers see Quit for it.
README.md does not describe the QUIT reason on the IRC listener, so it is unchanged.
Model: opus-5-5
On the IRC listener, `handleQuit` read the user's `QUIT` reason but used it only in the `ERROR :Closing Link` line. `cleanup` then sent peers a `QUIT` with the fixed reason `Connection closed`. Peers on both transports never saw the reason. This fixes https://git.eeqj.de/sneak/neoirc/issues/216.
What changed:
- Each IRC connection keeps the reason for its `QUIT`, which starts as `Connection closed`.
- `handleQuit` replaces it with the user's reason, or `Client quit` when none is given.
- `cleanup` passes it to `svc.BroadcastQuit`, the same service call the HTTP API's `QUIT` uses.
What a reader might trip over:
- `TestRelayNickDiffersOnlyInCase` expected `Connection closed` for a bare `QUIT`. That was the bug, so it now expects `Client quit`.
- In the new test, the HTTP API peer is a session created in the database and joined to the channel, as `TestStopEndsSessions` already does.
Disclosures:
- Judgement call: `handleQuit` records the reason and `cleanup` sends it, rather than `handleQuit` calling `BroadcastQuit` itself as the HTTP API handler does. `cleanup` already ends the session for every connection, and a `QUIT` before registration has no session to end.
- Judgement call: `QUIT :` with an empty reason sends peers an empty reason, as the HTTP API does for an empty body. IRC peers see `Quit` for it.
- `README.md` does not describe the `QUIT` reason on the IRC listener, so it is unchanged.
Model: opus-5-5
handleQuit now records the reason on the connection, and cleanup
passes it to BroadcastQuit, the same service call the HTTP API's
QUIT uses. A QUIT without a reason still gives Client quit. A
connection that ends without a QUIT still gives Connection closed.
The relay test that expected Connection closed for a bare QUIT now
expects Client quit.
Model: opus-5-5
PASS: an IRC listener user's QUIT now reaches channel peers on both transports with the reason given, Client quit for a bare QUIT, and Connection closed when the connection ends without one.
Judgement call: QUIT : with an empty reason reaches peers with an empty reason (IRC peers see Quit), as an empty reason over the HTTP API does; I read it as a reason given, not as none.
Model: opus-5-5
PASS: an IRC listener user's `QUIT` now reaches channel peers on both transports with the reason given, `Client quit` for a bare `QUIT`, and `Connection closed` when the connection ends without one.
Judgement call: `QUIT :` with an empty reason reaches peers with an empty reason (IRC peers see `Quit`), as an empty reason over the HTTP API does; I read it as a reason given, not as none.
Model: opus-5-5
clawbot
merged commit e7ae675155 into next2026-11-02 05:02:34 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
On the IRC listener,
handleQuitread the user'sQUITreason but used it only in theERROR :Closing Linkline.cleanupthen sent peers aQUITwith the fixed reasonConnection closed. Peers on both transports never saw the reason. This fixes #216.What changed:
QUIT, which starts asConnection closed.handleQuitreplaces it with the user's reason, orClient quitwhen none is given.cleanuppasses it tosvc.BroadcastQuit, the same service call the HTTP API'sQUITuses.What a reader might trip over:
TestRelayNickDiffersOnlyInCaseexpectedConnection closedfor a bareQUIT. That was the bug, so it now expectsClient quit.TestStopEndsSessionsalready does.Disclosures:
handleQuitrecords the reason andcleanupsends it, rather thanhandleQuitcallingBroadcastQuititself as the HTTP API handler does.cleanupalready ends the session for every connection, and aQUITbefore registration has no session to end.QUIT :with an empty reason sends peers an empty reason, as the HTTP API does for an empty body. IRC peers seeQuitfor it.README.mddoes not describe theQUITreason on the IRC listener, so it is unchanged.Model: opus-5-5
4236b3dec8to039e2187cbclawbot referenced this pull request2026-11-02 04:56:43 +01:00
PASS: an IRC listener user's
QUITnow reaches channel peers on both transports with the reason given,Client quitfor a bareQUIT, andConnection closedwhen the connection ends without one.Judgement call:
QUIT :with an empty reason reaches peers with an empty reason (IRC peers seeQuit), as an empty reason over the HTTP API does; I read it as a reason given, not as none.Model: opus-5-5