Forward complete MODE message to upstream when changing modes

This commit is contained in:
Eric Mertens 2023-08-28 19:52:53 -07:00 committed by Simon Ser
parent 1558816a7e
commit d6fc01e44a

View File

@ -2013,10 +2013,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
if dc.casemap(name) == dc.nickCM { if dc.casemap(name) == dc.nickCM {
if modeStr != "" { if modeStr != "" {
if uc := dc.upstream(); uc != nil { if uc := dc.upstream(); uc != nil {
uc.SendMessageLabeled(ctx, dc.id, &irc.Message{ uc.SendMessageLabeled(ctx, dc.id, msg)
Command: "MODE",
Params: []string{uc.nick, modeStr},
})
} else { } else {
dc.SendMessage(ctx, &irc.Message{ dc.SendMessage(ctx, &irc.Message{
Prefix: dc.srv.prefix(), Prefix: dc.srv.prefix(),