diff options
author | June McEnroe <june@causal.agency> | 2020-02-14 21:36:58 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-02-14 21:36:58 -0500 |
commit | 39a343980b634f41377d72426ced50ca8ae0fb64 (patch) | |
tree | af29e7daa153c7427bfaffcf42ea71bec5b96241 /command.c | |
parent | Add /away (diff) | |
download | catgirl-39a343980b634f41377d72426ced50ca8ae0fb64.tar.gz catgirl-39a343980b634f41377d72426ced50ca8ae0fb64.zip |
Add /invite
Diffstat (limited to '')
-rw-r--r-- | command.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 }, |