diff options
author | June McEnroe <june@causal.agency> | 2020-02-12 02:39:23 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-12 02:39:23 -0500 |
commit | 489df70c37d49ab17b396dcffc6776e2ba7829ed (patch) | |
tree | d81e0f1379a08da3cc1183b7850c591469068877 /command.c | |
parent | Simplify transpose swap (diff) | |
download | catgirl-489df70c37d49ab17b396dcffc6776e2ba7829ed.tar.gz catgirl-489df70c37d49ab17b396dcffc6776e2ba7829ed.zip |
Add /list
Diffstat (limited to '')
-rw-r--r-- | command.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/command.c b/command.c index 3505a5e..8166e2b 100644 --- a/command.c +++ b/command.c @@ -125,6 +125,16 @@ static void commandNames(size_t id, char *params) { replies.names++; } +static void commandList(size_t id, char *params) { + (void)id; + if (params) { + ircFormat("LIST :%s\r\n", params); + } else { + ircFormat("LIST\r\n"); + } + replies.list++; +} + static void commandWhois(size_t id, char *params) { (void)id; if (!params) return; @@ -201,6 +211,7 @@ static const struct Handler { { "/debug", .fn = commandDebug, .restricted = true }, { "/help", .fn = commandHelp }, { "/join", .fn = commandJoin, .restricted = true }, + { "/list", .fn = commandList }, { "/me", .fn = commandMe }, { "/msg", .fn = commandMsg, .restricted = true }, { "/names", .fn = commandNames }, |