On the IRC listener, handleQuit in internal/ircserver/commands.go reads the user's QUIT reason, sends it back in the ERROR :Closing Link line and marks the connection closed. When the connection then ends, cleanup in internal/ircserver/conn.go sends every peer a QUIT with the fixed reason Connection closed. The reason the user gave is lost, so peers on both transports see Connection closed for every IRC user who quits. Found by the rewrite of the README for #190; read from the code on ecf47c3.
Fix: the QUIT that peers receive carries the reason the user gave, or the listener's default Client quit when they gave none. A connection that ends without a QUIT keeps Connection closed. Change nothing else.
Definition of done
An IRC listener user's QUIT :gone home reaches a peer on the IRC listener and a peer on the HTTP API with the reason gone home.
A QUIT with no reason reaches peers as Client quit; a dropped connection still reaches them as Connection closed.
Tests in internal/ircserver for items 1 and 2.
If README.md describes the QUIT reason on the IRC listener, it says what the code now does.
One reviewed PR against next.
Model: opus-5-5
On the IRC listener, `handleQuit` in `internal/ircserver/commands.go` reads the user's `QUIT` reason, sends it back in the `ERROR :Closing Link` line and marks the connection closed. When the connection then ends, `cleanup` in `internal/ircserver/conn.go` sends every peer a `QUIT` with the fixed reason `Connection closed`. The reason the user gave is lost, so peers on both transports see `Connection closed` for every IRC user who quits. Found by the rewrite of the README for https://git.eeqj.de/sneak/neoirc/issues/190; read from the code on `ecf47c3`.
Fix: the `QUIT` that peers receive carries the reason the user gave, or the listener's default `Client quit` when they gave none. A connection that ends without a `QUIT` keeps `Connection closed`. Change nothing else.
## Definition of done
1. An IRC listener user's `QUIT :gone home` reaches a peer on the IRC listener and a peer on the HTTP API with the reason `gone home`.
2. A `QUIT` with no reason reaches peers as `Client quit`; a dropped connection still reaches them as `Connection closed`.
3. Tests in `internal/ircserver` for items 1 and 2.
4. If `README.md` describes the `QUIT` reason on the IRC listener, it says what the code now does.
5. One reviewed PR against `next`.
Model: opus-5-5
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,
handleQuitininternal/ircserver/commands.goreads the user'sQUITreason, sends it back in theERROR :Closing Linkline and marks the connection closed. When the connection then ends,cleanupininternal/ircserver/conn.gosends every peer aQUITwith the fixed reasonConnection closed. The reason the user gave is lost, so peers on both transports seeConnection closedfor every IRC user who quits. Found by the rewrite of the README for #190; read from the code onecf47c3.Fix: the
QUITthat peers receive carries the reason the user gave, or the listener's defaultClient quitwhen they gave none. A connection that ends without aQUITkeepsConnection closed. Change nothing else.Definition of done
QUIT :gone homereaches a peer on the IRC listener and a peer on the HTTP API with the reasongone home.QUITwith no reason reaches peers asClient quit; a dropped connection still reaches them asConnection closed.internal/ircserverfor items 1 and 2.README.mddescribes theQUITreason on the IRC listener, it says what the code now does.next.Model: opus-5-5
clawbot referenced this issue2026-10-27 17:02:40 +01:00