summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-05 21:57:23 -0500
committerJune McEnroe <june@causal.agency>2020-02-05 21:57:23 -0500
commit7c0e9cf3d2e83814fab3bb4bb09f7b955c2afaca (patch)
tree70adbed2adff0b4639f2a6647c6aa19121aa2f1a /command.c
parentAdd /me, /notice, /quote commands (diff)
downloadcatgirl-7c0e9cf3d2e83814fab3bb4bb09f7b955c2afaca.tar.gz
catgirl-7c0e9cf3d2e83814fab3bb4bb09f7b955c2afaca.zip
Add /quit
Diffstat (limited to 'command.c')
-rw-r--r--command.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/command.c b/command.c
index 0843bd3..7fb98af 100644
--- a/command.c
+++ b/command.c
@@ -56,12 +56,17 @@ static void commandMe(size_t id, char *params) {
 	commandPrivmsg(id, buf);
 }
 
+static void commandQuit(size_t id, char *params) {
+	set(&self.quit, (params ? params : "Goodbye"));
+}
+
 static const struct Handler {
 	const char *cmd;
 	Command *fn;
 } Commands[] = {
 	{ "/me", commandMe },
 	{ "/notice", commandNotice },
+	{ "/quit", commandQuit },
 	{ "/quote", commandQuote },
 };