about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--catgirl.14
-rw-r--r--command.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/catgirl.1 b/catgirl.1
index 5b9b1a5..4dc002e 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -1,4 +1,4 @@
-.Dd February  7, 2020
+.Dd February  8, 2020
 .Dt CATGIRL 1
 .Os
 .
@@ -134,6 +134,8 @@ Send an action message.
 Change nicknames.
 .It Ic /notice Ar message
 Send a notice.
+.It Ic /part Op Ar message
+Leave the channel.
 .It Ic /quit Op Ar message
 Quit IRC.
 .It Ic /quote Ar command
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 },
> 2019-07-12Make author consistent and update URLsJune McEnroe 2019-07-12Move to www/text.causal.agencyJune McEnroe 2019-07-12Add new causal.agency with shotty shotsJune McEnroe 2019-07-12Use -s to infer terminal sizeJune McEnroe 2019-07-12Add DCH to shottyJune McEnroe This makes htop mostly work. Scrolling region still missing. 2019-07-12Support insert mode in shottyJune McEnroe This is how curses puts characters into the bottom-right cell of the terminal. 2019-07-11Don't do carriage return on line feedJune McEnroe 2019-07-11Interpret 256color-style SGRsJune McEnroe 2019-07-11Use inline style rather than <b>, <i>, <u>June McEnroe 2019-07-11Factor out clearJune McEnroe 2019-07-11Add bright option to shottyJune McEnroe 2019-07-11Output <b>, <i>, <u> in shottyJune McEnroe 2019-07-10Ignore SM and RMJune McEnroe 2019-07-09Add shotty man page and build itJune McEnroe 2019-07-09Add up -cJune McEnroe 2019-07-09Add options for default colors to shottyJune McEnroe 2019-07-08Use char literals consistentlyJune McEnroe