summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-08 03:15:17 -0500
committerJune McEnroe <june@causal.agency>2020-02-08 03:15:17 -0500
commitb6bf6d62b0bb6d203ce41e4b375c415ca8fde719 (patch)
tree8ef0a65fc49fce6d40ce8e1aff552c25a88f20b5 /command.c
parentAdd /debug (diff)
downloadcatgirl-b6bf6d62b0bb6d203ce41e4b375c415ca8fde719.tar.gz
catgirl-b6bf6d62b0bb6d203ce41e4b375c415ca8fde719.zip
Only show expected topic/names replies
Diffstat (limited to 'command.c')
-rw-r--r--command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/command.c b/command.c
index 1d1c756..9879dbe 100644
--- a/command.c
+++ b/command.c
@@ -71,7 +71,15 @@ static void commandMe(size_t id, char *params) {
 }
 
 static void commandJoin(size_t id, char *params) {
+	size_t count = 1;
+	if (params) {
+		for (char *ch = params; *ch && *ch != ' '; ++ch) {
+			if (*ch == ',') count++;
+		}
+	}
 	ircFormat("JOIN %s\r\n", (params ? params : idNames[id]));
+	replies.topic += count;
+	replies.names += count;
 }
 
 static void commandPart(size_t id, char *params) {