From 7e4fa80c9629ac582523d4ee84e32196d6169ae2 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 10 Jun 2021 19:38:12 -0400 Subject: [PATCH] Avoid trailing comma in whois channels lists The format of the reply is defined as " :{[@|+]}". --- handle.c | 1 + 1 file changed, 1 insertion(+) diff --git a/handle.c b/handle.c index 012b4ea..844fb74 100644 --- a/handle.c +++ b/handle.c @@ -1082,6 +1082,7 @@ static void handleReplyWhoisChannels(struct Message *msg) { char *ptr = buf, *end = &buf[sizeof(buf)]; while (msg->params[2]) { char *channel = strsep(&msg->params[2], " "); + if (!channel[0]) break; char *name = &channel[strspn(channel, network.prefixes)]; ptr = seprintf( ptr, end, "%s\3%02d%s\3",