From 489df70c37d49ab17b396dcffc6776e2ba7829ed Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Wed, 12 Feb 2020 02:39:23 -0500 Subject: Add /list --- command.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'command.c') 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 }, -- cgit 1.4.1-2-gfad0