From 84188ba644728a8d80bb3f0c4b7dd003c85b9150 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 8 Jul 2022 18:17:24 +0200 Subject: [PATCH] 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. --- downstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index f20e33f..e93b9ae 100644 --- a/downstream.go +++ b/downstream.go @@ -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}, })