summary refs log tree commit diff
path: root/input.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-02 22:12:07 -0400
committerJune McEnroe <june@causal.agency>2019-07-02 22:12:07 -0400
commit3d1f7d80658db3b4839febb817c610dd06a7801b (patch)
treed1ef8122288ea121f9698ad8286c134826032ac7 /input.c
parentDeal with ~users in colorGen (diff)
downloadcatgirl-3d1f7d80658db3b4839febb817c610dd06a7801b.tar.gz
catgirl-3d1f7d80658db3b4839febb817c610dd06a7801b.zip
Add /list
Diffstat (limited to 'input.c')
-rw-r--r--input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/input.c b/input.c
index 81ff1cf..c4f707e 100644
--- a/input.c
+++ b/input.c
@@ -50,6 +50,16 @@ static void inputJoin(struct Tag tag, char *params) {
 	}
 }
 
+static void inputList(struct Tag tag, char *params) {
+	(void)tag;
+	char *chan = strsep(&params, " ");
+	if (chan) {
+		ircFmt("LIST %s\r\n", chan);
+	} else {
+		ircFmt("LIST\r\n");
+	}
+}
+
 static void inputMe(struct Tag tag, char *params) {
 	privmsg(tag, true, params ? params : "");
 }
@@ -189,6 +199,7 @@ static const struct {
 	{ "/close", inputClose },
 	{ "/help", inputMan },
 	{ "/join", inputJoin },
+	{ "/list", inputList },
 	{ "/man", inputMan },
 	{ "/me", inputMe },
 	{ "/move", inputMove },