1 Commits
Author SHA1 Message Date
sneak 648105d99c 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
2026-11-02 02:59:22 +00:00
4 changed files with 8 additions and 7 deletions

No files matched your search

+1 -1
View File
@@ -412,7 +412,7 @@ func (hdlr *Handlers) deliverWelcome(
// 004 RPL_MYINFO // 004 RPL_MYINFO
hdlr.enqueueNumeric( hdlr.enqueueNumeric(
ctx, clientID, irc.RplMyInfo, nick, ctx, clientID, irc.RplMyInfo, nick,
[]string{srvName, version, irc.UserModes, "ikmnostl"}, []string{srvName, version, service.UserModes, "ikmnostl"},
"", "",
) )
+1 -1
View File
@@ -605,7 +605,7 @@ func (c *Conn) deliverWelcome() {
) )
c.sendNumeric( c.sendNumeric(
irc.RplMyInfo, irc.RplMyInfo,
c.serverSfx, "neoirc", irc.UserModes, "mnst", c.serverSfx, "neoirc", service.UserModes, "mnst",
) )
c.sendNumeric( c.sendNumeric(
irc.RplIsupport, irc.RplIsupport,
+6
View File
@@ -1169,6 +1169,12 @@ func (s *Service) ApplyUserMode(
return s.QueryUserMode(ctx, sessionID) return s.QueryUserMode(ctx, sessionID)
} }
// UserModes lists the user modes the server supports, as
// RPL_MYINFO sends them: o (server operator) and w
// (receives WALLOPS). parseUserModeString must accept the
// same letters.
const UserModes = "ow"
// parseUserModeString parses a user mode string such as // parseUserModeString parses a user mode string such as
// "+w", "-o" or "+w-o" into the new value of each flag it // "+w", "-o" or "+w-o" into the new value of each flag it
// names, or nil for a flag it does not name; a later letter // names, or nil for a flag it does not name; a later letter
-5
View File
@@ -65,11 +65,6 @@ const (
RplIsupport IRCMessageType = 5 // De-facto standard (same numeric as RplBounce) RplIsupport IRCMessageType = 5 // De-facto standard (same numeric as RplBounce)
) )
// UserModes lists the user modes the server supports, as
// RPL_MYINFO sends them: o (server operator) and w
// (receives WALLOPS).
const UserModes = "ow"
// Command responses (200-399). // Command responses (200-399).
const ( const (
// RFC 2812 trace/stats/links replies (200-219). // RFC 2812 trace/stats/links replies (200-219).