The 004 reply leaves out channel modes the server accepts #238

Closed
opened 2026-11-02 03:49:40 +01:00 by clawbot · 1 comment
Collaborator

The channel-modes parameter of the 004 reply (RPL_MYINFO) leaves out modes that each transport's MODE accepts. The IRC listener (deliverWelcome in internal/ircserver/conn.go) sends mnst, but its MODE also accepts i, o, v and H. The HTTP API (internal/handlers/api.go) sends ikmnostl, but its MODE also accepts b, v and H. README.md Channel Modes lists what each transport accepts. Each 005 CHANMODES already matches its transport. Found by the work on #237; read from the code on 0662e87.

Fix: each transport's 004 lists exactly the channel modes its MODE accepts, o and v included. The two lists differ only where README.md says the transports differ (b, k and l are HTTP API only). Change nothing else.

Definition of done

  1. The IRC listener's 004 lists H, i, m, n, o, s, t and v, and no other channel mode.
  2. The HTTP API's 004 lists H, b, i, k, l, m, n, o, s, t and v, and no other channel mode.
  3. Tests for both transports.
  4. README.md and schema/README.md, where they show the 004 reply, say what the code now sends.
  5. One reviewed PR against next, cut after #220 has landed, since it changes the same lines.

Model: opus-5-5

The channel-modes parameter of the `004` reply (`RPL_MYINFO`) leaves out modes that each transport's `MODE` accepts. The IRC listener (`deliverWelcome` in `internal/ircserver/conn.go`) sends `mnst`, but its `MODE` also accepts `i`, `o`, `v` and `H`. The HTTP API (`internal/handlers/api.go`) sends `ikmnostl`, but its `MODE` also accepts `b`, `v` and `H`. `README.md` Channel Modes lists what each transport accepts. Each `005` `CHANMODES` already matches its transport. Found by the work on https://git.eeqj.de/sneak/neoirc/pulls/237; read from the code on `0662e87`. Fix: each transport's `004` lists exactly the channel modes its `MODE` accepts, `o` and `v` included. The two lists differ only where `README.md` says the transports differ (`b`, `k` and `l` are HTTP API only). Change nothing else. ## Definition of done 1. The IRC listener's `004` lists `H`, `i`, `m`, `n`, `o`, `s`, `t` and `v`, and no other channel mode. 2. The HTTP API's `004` lists `H`, `b`, `i`, `k`, `l`, `m`, `n`, `o`, `s`, `t` and `v`, and no other channel mode. 3. Tests for both transports. 4. `README.md` and `schema/README.md`, where they show the `004` reply, say what the code now sends. 5. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/issues/220 has landed, since it changes the same lines. Model: opus-5-5
Author
Collaborator

Built in #240: the IRC listener's 004 now lists Himnostv and the HTTP API's Hbiklmnostv. The HTTP API's list keeps n as the definition of done says, although its MODE does not accept n; the PR notes this.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/neoirc/pulls/240: the IRC listener's `004` now lists `Himnostv` and the HTTP API's `Hbiklmnostv`. The HTTP API's list keeps `n` as the definition of done says, although its `MODE` does not accept `n`; the PR notes this. 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#238