The 004 reply sends an empty user-modes parameter #220

Open
opened 2026-10-27 16:39:15 +01:00 by clawbot · 0 comments
Collaborator

deliverWelcome in internal/ircserver/conn.go sends RPL_MYINFO (004) with an empty string as the user-modes parameter: :server 004 nick server neoirc mnst. IRC does not allow an empty parameter in the middle of a line. Clients that split on runs of spaces read mnst as the user modes and find no channel modes. The server does have user modes, +o and +w. The HTTP API's 004 also sends an empty string there. Found by the review of #215; read from the code on 83a1585.

Fix: both transports send the user modes the server supports in the 004 reply, so no parameter is empty. Change nothing else.

Definition of done

  1. The IRC listener's 004 line has no empty parameter, and its user-modes parameter lists the user modes the server supports.
  2. The HTTP API's 004 carries the same user modes.
  3. Tests for both transports.
  4. README.md and schema/README.md, where they describe the 004 reply, say what the code now sends.
  5. One reviewed PR against next.

Model: opus-5-5

`deliverWelcome` in `internal/ircserver/conn.go` sends `RPL_MYINFO` (`004`) with an empty string as the user-modes parameter: `:server 004 nick server neoirc mnst`. IRC does not allow an empty parameter in the middle of a line. Clients that split on runs of spaces read `mnst` as the user modes and find no channel modes. The server does have user modes, `+o` and `+w`. The HTTP API's `004` also sends an empty string there. Found by the review of https://git.eeqj.de/sneak/neoirc/pulls/215; read from the code on `83a1585`. Fix: both transports send the user modes the server supports in the `004` reply, so no parameter is empty. Change nothing else. ## Definition of done 1. The IRC listener's `004` line has no empty parameter, and its user-modes parameter lists the user modes the server supports. 2. The HTTP API's `004` carries the same user modes. 3. Tests for both transports. 4. `README.md` and `schema/README.md`, where they describe the `004` reply, say what the code now sends. 5. One reviewed PR against `next`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#220