diff options
author | June McEnroe <june@causal.agency> | 2020-02-08 03:15:17 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-08 03:15:17 -0500 |
commit | b6bf6d62b0bb6d203ce41e4b375c415ca8fde719 (patch) | |
tree | 8ef0a65fc49fce6d40ce8e1aff552c25a88f20b5 /command.c | |
parent | Add /debug (diff) | |
download | catgirl-b6bf6d62b0bb6d203ce41e4b375c415ca8fde719.tar.gz catgirl-b6bf6d62b0bb6d203ce41e4b375c415ca8fde719.zip |
Only show expected topic/names replies
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
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) { |