List the user modes in the 004 reply (closes #220)
check / check (push) Canceled after 0s

Both transports sent an empty string as the user modes in RPL_MYINFO.
On the IRC listener that left an empty parameter in the middle of the
line, so a client that splits on spaces read the channel modes as the
user modes. The reply now lists o and w, the user modes the server
supports. Both transports read them from one constant in
internal/service, next to the code that decides which user modes MODE
accepts. The README and the schema notes now show what the HTTP API
sends.

Model: opus-5-5
This commit was merged in pull request #237.
This commit is contained in:
2026-11-02 04:17:09 +01:00
parent 0662e87f49
commit cc18397ee1
7 changed files with 51 additions and 5 deletions
+1 -1
View File
@@ -605,7 +605,7 @@ func (c *Conn) deliverWelcome() {
)
c.sendNumeric(
irc.RplMyInfo,
c.serverSfx, "neoirc", "", "mnst",
c.serverSfx, "neoirc", service.UserModes, "mnst",
)
c.sendNumeric(
irc.RplIsupport,
+16
View File
@@ -486,6 +486,22 @@ func TestWelcomeContainsNick(t *testing.T) {
}
}
// TestMyInfoListsUserModes checks that RPL_MYINFO lists the
// user modes o and w, with no empty parameter before the
// channel modes.
func TestMyInfoListsUserModes(t *testing.T) {
t.Parallel()
env := newTestEnv(t)
lines := env.dial(t).register("carol")
assertContains(
t, lines,
":test.irc 004 carol test.irc neoirc ow mnst",
"RPL_MYINFO with user modes",
)
}
func TestPingPong(t *testing.T) {
t.Parallel()