summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-12 02:39:23 -0500
committerJune McEnroe <june@causal.agency>2020-02-12 02:39:23 -0500
commit489df70c37d49ab17b396dcffc6776e2ba7829ed (patch)
treed81e0f1379a08da3cc1183b7850c591469068877 /command.c
parentSimplify transpose swap (diff)
downloadcatgirl-489df70c37d49ab17b396dcffc6776e2ba7829ed.tar.gz
catgirl-489df70c37d49ab17b396dcffc6776e2ba7829ed.zip
Add /list
Diffstat (limited to 'command.c')
-rw-r--r--command.c11
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 },
olspan='3' class='logmsg'> 2019-02-08Switch back to semantic keyword grouping in hiJune McEnroe 2019-02-08Match only the basename in hiJune McEnroe 2019-02-07Add mdoc syntax to hiJune McEnroe 2019-02-07Support multi-line C macros in hiJune McEnroe 2019-02-07Detect .mk files as makeJune McEnroe 2019-02-07Add make syntax to hiJune McEnroe 2019-02-07Add IRC output to hiJune McEnroe 2019-02-07Improve C syntax accuracy and add Format classJune McEnroe 2019-02-07Factor out hi checkJune McEnroe Fix subexpression bounds check and compile pattends. 2019-02-07Add Escape class to hiJune McEnroe 2019-02-07Add Todo class and parent syntax constraintJune McEnroe