Fix operator flag in RPL_WHOREPLY

@ and + indicate channel privileges. * indicates that the user is
a server operator.
This commit is contained in:
Simon Ser 2021-11-01 18:36:21 +01:00
parent 62d92c660f
commit 8c7c907d6f

View File

@ -1901,7 +1901,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
// TODO: support AWAY (H/G) in self WHO reply // TODO: support AWAY (H/G) in self WHO reply
flags := "H" flags := "H"
if dc.user.Admin { if dc.user.Admin {
flags += "@" flags += "*"
} }
dc.SendMessage(&irc.Message{ dc.SendMessage(&irc.Message{
Prefix: dc.srv.prefix(), Prefix: dc.srv.prefix(),
@ -1919,7 +1919,7 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
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{serviceNick, "*", servicePrefix.User, servicePrefix.Host, dc.srv.Hostname, serviceNick, "H@", "0 " + serviceRealname}, Params: []string{serviceNick, "*", servicePrefix.User, servicePrefix.Host, dc.srv.Hostname, serviceNick, "H*", "0 " + serviceRealname},
}) })
dc.SendMessage(&irc.Message{ dc.SendMessage(&irc.Message{
Prefix: dc.srv.prefix(), Prefix: dc.srv.prefix(),