summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
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) {