Compare nicks by exact case everywhere (closes #128) #141

Merged
clawbot merged 1 commits from issue-128-exact-nicks into next 2026-10-20 16:31:29 +02:00
Collaborator

Closes #128.

README.md (Nick Semantics) rules that nicks are case-sensitive, but some comparisons ignored case. They now use ==:

  • the IRC listener's relay (internal/ircserver/relay.go): an IRC listener user alice now receives PRIVMSG, NOTICE, JOIN, PART, NICK and QUIT from Alice;
  • user MODE on both transports (handleUserMode in internal/ircserver/commands.go and internal/handlers/utility.go): MODE Alice from alice gets 502.

Tests: a new relay test in internal/ircserver/relay_test.go, in which Alice also registers while alice is connected. The user mode tests on both transports used to send the nick in upper case and expect 221; they now send MODE Alice, expect 502, and check the modes did not change. The HTTP duplicate-session test also creates Alice next to alice.

README.md: dropped "Nick comparison is case-insensitive." and the "One gap remains" paragraph.

  • Deviation: also dropped "compared without regard to letter case" from the user modes paragraph of the MODE section, which described the old behaviour.
  • Judgement call: ban masks (+b) still match ignoring letter case, as README.md documents. They are patterns over the whole nick!user@host, not a comparison of two nicks; making them exact is a separate decision.
  • Judgement call: the web client still sorts the member list ignoring case; that is display order, not a comparison.
  • Judgement call: 005 keeps CASEMAPPING=ascii, as the issue says.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/neoirc/issues/128. `README.md` (Nick Semantics) rules that nicks are case-sensitive, but some comparisons ignored case. They now use `==`: - the IRC listener's relay (`internal/ircserver/relay.go`): an IRC listener user `alice` now receives `PRIVMSG`, `NOTICE`, `JOIN`, `PART`, `NICK` and `QUIT` from `Alice`; - user `MODE` on both transports (`handleUserMode` in `internal/ircserver/commands.go` and `internal/handlers/utility.go`): `MODE Alice` from `alice` gets 502. Tests: a new relay test in `internal/ircserver/relay_test.go`, in which `Alice` also registers while `alice` is connected. The user mode tests on both transports used to send the nick in upper case and expect 221; they now send `MODE Alice`, expect 502, and check the modes did not change. The HTTP duplicate-session test also creates `Alice` next to `alice`. `README.md`: dropped "Nick comparison is case-insensitive." and the "One gap remains" paragraph. - Deviation: also dropped "compared without regard to letter case" from the user modes paragraph of the `MODE` section, which described the old behaviour. - Judgement call: ban masks (`+b`) still match ignoring letter case, as `README.md` documents. They are patterns over the whole `nick!user@host`, not a comparison of two nicks; making them exact is a separate decision. - Judgement call: the web client still sorts the member list ignoring case; that is display order, not a comparison. - Judgement call: `005` keeps `CASEMAPPING=ascii`, as the issue says. Model: opus-5-5
clawbot added the needs-review label 2026-10-20 16:10:15 +02:00
clawbot self-assigned this 2026-10-20 16:10:15 +02:00
clawbot added 1 commit 2026-10-20 16:10:15 +02:00
README.md rules that nicks are case-sensitive, but the IRC listener's
relay and user MODE on both transports compared nicks ignoring case:
an IRC listener user alice never saw a PRIVMSG, NOTICE, JOIN, PART,
NICK or QUIT from Alice, and MODE Alice from alice was taken as her
own nick. These checks now use ==.

Tests cover alice receiving each of these from Alice, MODE Alice from
alice getting 502 on both transports, and Alice registering while
alice exists. README.md drops the text that described the old
behaviour.

Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

**PASS** Model: opus-5-5
clawbot removed the needs-review label 2026-10-20 16:27:48 +02:00
clawbot merged commit eceb5f2b2c into next 2026-10-20 16:31:29 +02:00
clawbot deleted branch issue-128-exact-nicks 2026-10-20 16:31:30 +02:00
Sign in to join this conversation.