downstream: relay SETNAME with upstreamConn.SendMessageLabeled

This makes it so any errors are only relayed to this downstream
connection.

The upstream handler for SETNAME handles the broadcasting to all
downstream connections already.
This commit is contained in:
Simon Ser 2022-07-08 18:17:24 +02:00
parent b1b4541a53
commit 84188ba644

View file

@ -1872,7 +1872,7 @@ func (dc *downstreamConn) handleMessageRegistered(ctx context.Context, msg *irc.
if uc := dc.upstream(); uc != nil && uc.caps.IsEnabled("setname") {
// Upstream will reply with a SETNAME message on success
uc.SendMessage(ctx, &irc.Message{
uc.SendMessageLabeled(ctx, dc.id, &irc.Message{
Command: "SETNAME",
Params: []string{realname},
})