summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c7
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(&params, " ");
+	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 },