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.
This commit is contained in:
delthas 2020-03-23 03:56:17 +01:00 committed by Simon Ser
parent 6e72071716
commit d00698e15c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 0 deletions

View File

@ -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 {