From d00698e15cb6789245dd9a5035e913578ff36606 Mon Sep 17 00:00:00 2001 From: delthas Date: Mon, 23 Mar 2020 03:56:17 +0100 Subject: [PATCH] Fix wrong handling of members parameter of RPL_NAMREPLY Some servers (namely UnrealIRCd) wrongly add a trailing space to the members parameters of the RPL_NAMREPLY command, which was not handled correctly. Adding a trailing space is not legal wrt the IRC specs, but since UnrealIRCd does it and is in wide use today, we have to work around it. --- upstream.go | 1 + 1 file changed, 1 insertion(+) diff --git a/upstream.go b/upstream.go index 95e0def..5548e46 100644 --- a/upstream.go +++ b/upstream.go @@ -746,6 +746,7 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error { if err := parseMessageParams(msg, nil, &statusStr, &name, &members); err != nil { return err } + members = strings.TrimRight(members, " ") ch, ok := uc.channels[name] if !ok {