summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-27 02:07:40 -0500
committerJune McEnroe <june@causal.agency>2020-02-27 02:07:40 -0500
commit0e519adaadf43bac33ac6caf3d37aed580724ea6 (patch)
tree1c3750f1ecb3cce5d12c978ad8a27f98ed1b963b /state.c
parentSupport setname (diff)
downloadpounce-0e519adaadf43bac33ac6caf3d37aed580724ea6.tar.gz
pounce-0e519adaadf43bac33ac6caf3d37aed580724ea6.zip
Support cap-notify
Diffstat (limited to '')
-rw-r--r--state.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/state.c b/state.c
index c714628..d840018 100644
--- a/state.c
+++ b/state.c
@@ -74,9 +74,9 @@ static void handleCap(struct Message *msg) {
 	require(msg, false, 3);
 	enum Cap caps = capParse(msg->params[2]);
 
-	if (!strcmp(msg->params[1], "LS")) {
+	if (!strcmp(msg->params[1], "LS") || !strcmp(msg->params[1], "NEW")) {
 		caps &= ~(CapSASL | CapUnsupported);
-		serverFormat("CAP REQ :%s\r\n", capList(caps));
+		if (caps) serverFormat("CAP REQ :%s\r\n", capList(caps));
 
 	} else if (!strcmp(msg->params[1], "ACK")) {
 		stateCaps |= caps;
@@ -87,6 +87,9 @@ static void handleCap(struct Message *msg) {
 		}
 		if (!(stateCaps & CapSASL)) serverFormat("CAP END\r\n");
 
+	} else if (!strcmp(msg->params[1], "DEL")) {
+		stateCaps &= ~caps;
+
 	} else if (!strcmp(msg->params[1], "NAK")) {
 		errx(EX_CONFIG, "server does not support %s", msg->params[2]);
 	}
='logsubject'>Fix weird tab-complete after commaJune McEnroe I have no idea why I did this. 2018-09-13Rewrite UI againJune McEnroe The persistent topic is gone and the status line is now at the top. The status formatting still needs to be reworked. I also want to try showing the nick in the input window so it really looks like your next message. 2018-09-12Add note about C-oJune McEnroe Why are there so few well usable ctrl key bindings? 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe Ridiculous. 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