lib/client: fix number of field check in RPL_WHOSPCRPL

The first field is the client.
This commit is contained in:
Simon Ser 2024-04-17 23:29:54 +02:00
parent 87e88cccca
commit 1ea7c30744

View file

@ -534,7 +534,7 @@ export default class Client extends EventTarget {
l.push(this.parseWhoReply(msg));
break;
case irc.RPL_WHOSPCRPL:
if (msg.params.length !== fields.length || msg.params[1] !== token) {
if (msg.params.length !== fields.length + 1 || msg.params[1] !== token) {
break;
}
l.push(this.parseWhoReply(msg));