summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-06-10 19:38:12 -0400
committerJune McEnroe <june@causal.agency>2021-06-10 19:38:12 -0400
commit7e4fa80c9629ac582523d4ee84e32196d6169ae2 (patch)
tree5c9d7124b2b0f400b6d5327fbeca69436dd4103e
parentMove unveilAll back into main (diff)
downloadcatgirl-7e4fa80c9629ac582523d4ee84e32196d6169ae2.tar.gz
catgirl-7e4fa80c9629ac582523d4ee84e32196d6169ae2.zip
Avoid trailing comma in whois channels lists
The format of the reply is defined as "<nick> :{[@|+]<channel><space>}".
-rw-r--r--handle.c1
1 files changed, 1 insertions, 0 deletions
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",
Add PS0June McEnroe 2019-01-13Change default ENV from cashrc to env.shJune McEnroe 2019-01-13Use colours in cash promptsJune McEnroe 2019-01-12Set PSlit like NetBSD shJune McEnroe 2019-01-12Install gnupg2 from pkgsrc and symlink gpgJune McEnroe 2019-01-12Reference cash builtin man pages in cash.1 SEE ALSOJune McEnroe 2019-01-12Restore cash builtin man page datesJune McEnroe 2019-01-12Use local libeditJune McEnroe 2019-01-12Replace libedit MakefileJune McEnroe 2019-01-11Import /usr/src/lib/libedit from NetBSD 8.0June McEnroe 2019-01-11Add PSlit for prompt escapesJune McEnroe 2019-01-11Don't make depend automaticallyJune McEnroe