From 39a343980b634f41377d72426ced50ca8ae0fb64 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 14 Feb 2020 21:36:58 -0500 Subject: Add /invite --- command.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index 00c3040..f59176f 100644 --- a/command.c +++ b/command.c @@ -135,6 +135,12 @@ static void commandNames(size_t id, char *params) { replies.names++; } +static void commandInvite(size_t id, char *params) { + if (!params) return; + char *nick = strsep(¶ms, " "); + ircFormat("INVITE %s %s\r\n", nick, idNames[id]); +} + static void commandList(size_t id, char *params) { (void)id; if (params) { @@ -251,6 +257,7 @@ static const struct Handler { { "/debug", .fn = commandDebug, .restricted = true }, { "/exec", .fn = commandExec, .restricted = true }, { "/help", .fn = commandHelp }, + { "/invite", .fn = commandInvite }, { "/join", .fn = commandJoin, .restricted = true }, { "/list", .fn = commandList }, { "/me", .fn = commandMe }, -- cgit 1.4.1