Fix flags variable name in RPL_WHOREPLY handler

This param doesn't contain modes, it contains user flags (such as
H/G for away status).
This commit is contained in:
Simon Ser 2022-02-09 15:20:32 +01:00
parent 009bc29e09
commit b1a83529e1

View File

@ -1341,8 +1341,8 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
}) })
} }
case irc.RPL_WHOREPLY: case irc.RPL_WHOREPLY:
var channel, username, host, server, nick, mode, trailing string var channel, username, host, server, nick, flags, trailing string
if err := parseMessageParams(msg, nil, &channel, &username, &host, &server, &nick, &mode, &trailing); err != nil { if err := parseMessageParams(msg, nil, &channel, &username, &host, &server, &nick, &flags, &trailing); err != nil {
return err return err
} }
@ -1360,7 +1360,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
dc.SendMessage(&irc.Message{ dc.SendMessage(&irc.Message{
Prefix: dc.srv.prefix(), Prefix: dc.srv.prefix(),
Command: irc.RPL_WHOREPLY, Command: irc.RPL_WHOREPLY,
Params: []string{dc.nick, channel, username, host, server, nick, mode, trailing}, Params: []string{dc.nick, channel, username, host, server, nick, flags, trailing},
}) })
case rpl_whospcrpl: case rpl_whospcrpl:
dc, cmd := uc.currentPendingCommand("WHO") dc, cmd := uc.currentPendingCommand("WHO")