about summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
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 },