summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorC. McEnroe2020-12-30 14:29:32 -0500
committerC. McEnroe2020-12-30 14:29:32 -0500
commit8b6a476c35c4ee209dbaa3feced83aff4c02b5d5 (patch)
tree0224d206266e97b1dcc868c21599784a39cf2c8f /command.c
parent05fbcb41c9a4d913677e91bf7414ef399374ed0f (diff)
Add /whowas
Diffstat (limited to 'command.c')
-rw-r--r--command.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/command.c b/command.c
index bf5a2e3..de8d0ff 100644
--- a/command.c
+++ b/command.c
@@ -316,6 +316,13 @@ static void commandWhois(uint id, char *params) {
 	replies.whois += count;
 }
 
+static void commandWhowas(uint id, char *params) {
+	(void)id;
+	if (!params) return;
+	ircFormat("WHOWAS %s\r\n", params);
+	replies.whowas++;
+}
+
 static void commandNS(uint id, char *params) {
 	(void)id;
 	if (params) ircFormat("PRIVMSG NickServ :%s\r\n", params);
@@ -500,6 +507,7 @@ static const struct Handler {
 	{ "/uninvex", commandUninvex, 0 },
 	{ "/voice", commandVoice, 0 },
 	{ "/whois", commandWhois, 0 },
+	{ "/whowas", commandWhowas, 0 },
 	{ "/window", commandWindow, 0 },
 };