From 55173ef29777959b0b761097499e3eef397de609 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 8 Feb 2020 00:02:10 -0500 Subject: Add /nick --- catgirl.1 | 2 ++ command.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/catgirl.1 b/catgirl.1 index 76f527e..5b9b1a5 100644 --- a/catgirl.1 +++ b/catgirl.1 @@ -130,6 +130,8 @@ can be typed Join a channel. .It Ic /me Op Ar action Send an action message. +.It Ic /nick Ar nick +Change nicknames. .It Ic /notice Ar message Send a notice. .It Ic /quit Op Ar message diff --git a/command.c b/command.c index 8bd8b28..7416f81 100644 --- a/command.c +++ b/command.c @@ -69,6 +69,12 @@ static void commandQuit(size_t id, char *params) { set(&self.quit, (params ? params : "Goodbye")); } +static void commandNick(size_t id, char *params) { + (void)id; + if (!params) return; + ircFormat("NICK :%s\r\n", params); +} + static void commandWindow(size_t id, char *params) { if (!params) return; if (isdigit(params[0])) { @@ -85,6 +91,7 @@ static const struct Handler { } Commands[] = { { "/join", commandJoin }, { "/me", commandMe }, + { "/nick", commandNick }, { "/notice", commandNotice }, { "/quit", commandQuit }, { "/quote", commandQuote }, -- cgit 1.4.1