about summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--command.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/command.c b/command.c
index 7416f81..dfe4850 100644
--- a/command.c
+++ b/command.c
@@ -64,6 +64,14 @@ static void commandJoin(size_t id, char *params) {
 	ircFormat("JOIN %s\r\n", (params ? params : idNames[id]));
 }
 
+static void commandPart(size_t id, char *params) {
+	if (params) {
+		ircFormat("PART %s :%s\r\n", idNames[id], params);
+	} else {
+		ircFormat("PART %s\r\n", idNames[id]);
+	}
+}
+
 static void commandQuit(size_t id, char *params) {
 	(void)id;
 	set(&self.quit, (params ? params : "Goodbye"));
@@ -93,6 +101,7 @@ static const struct Handler {
 	{ "/me", commandMe },
 	{ "/nick", commandNick },
 	{ "/notice", commandNotice },
+	{ "/part", commandPart },
 	{ "/quit", commandQuit },
 	{ "/quote", commandQuote },
 	{ "/window", commandWindow },
low=1'>Cast towupper to wchar_tJune McEnroe 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroed>June McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe