upstream: fix server message detection for wildcard targets

Prior to connection registration, NOTICE messages are sent to "*".
This commit is contained in:
Simon Ser 2022-07-08 14:41:18 +02:00
parent 739adf7eb9
commit dc356200c2

View File

@ -503,7 +503,7 @@ func (uc *upstreamConn) handleMessage(ctx context.Context, msg *irc.Message) err
break
}
if msg.Prefix.Name == uc.serverPrefix.Name || msg.Prefix.Name == "*" || strings.HasPrefix(target, "$") {
if msg.Prefix.Name == uc.serverPrefix.Name || target == "*" || strings.HasPrefix(target, "$") {
// This is a server message
uc.produce("", msg, 0)
break