summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-25 02:24:29 -0500
committerJune McEnroe <june@causal.agency>2020-02-25 02:24:29 -0500
commit431945614da363f1e89463ea5cadbf882c3c64d6 (patch)
tree6f00ecda87ab09ad3d39e1f4535348482c71b9a2
parentAdd /mode, /except, /invex and handle lists replies (diff)
downloadcatgirl-431945614da363f1e89463ea5cadbf882c3c64d6.tar.gz
catgirl-431945614da363f1e89463ea5cadbf882c3c64d6.zip
Fix handling EXCEPTS and INVEX without values
-rw-r--r--handle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index f1fc75d..9a0be57 100644
--- a/handle.c
+++ b/handle.c
@@ -227,21 +227,24 @@ static void handleReplyISupport(struct Message *msg) {
 	for (uint i = 1; i < ParamCap; ++i) {
 		if (!msg->params[i]) break;
 		char *key = strsep(&msg->params[i], "=");
-		if (!msg->params[i]) continue;
 		if (!strcmp(key, "NETWORK")) {
+			if (!msg->params[i]) continue;
 			set(&network.name, msg->params[i]);
 			uiFormat(
 				Network, Cold, tagTime(msg),
 				"You arrive in %s", msg->params[i]
 			);
 		} else if (!strcmp(key, "CHANTYPES")) {
+			if (!msg->params[i]) continue;
 			set(&network.chanTypes, msg->params[i]);
 		} else if (!strcmp(key, "PREFIX")) {
+			if (!msg->params[i]) continue;
 			strsep(&msg->params[i], "(");
 			set(&network.prefixModes, strsep(&msg->params[i], ")"));
 			set(&network.prefixes, msg->params[i]);
 			assert(strlen(network.prefixes) == strlen(network.prefixModes));
 		} else if (!strcmp(key, "CHANMODES")) {
+			if (!msg->params[i]) continue;
 			set(&network.listModes, strsep(&msg->params[i], ","));
 			set(&network.paramModes, strsep(&msg->params[i], ","));
 			set(&network.setParamModes, strsep(&msg->params[i], ","));
llow=1'>Fix cwm window cycling, move big by defaultJune McEnroe 2021-02-07Use class names for Foreground, Background, BorderColorJune McEnroe 2021-02-07Add simple battery status and clock to xsessionJune McEnroe 2021-02-07Set cursor theme and sizeJune McEnroe 2021-02-07Use scrot for up -s if no screencaptureJune McEnroe 2021-02-07Enable mouse acceleration in XJune McEnroe 2021-02-07Set colours for Xt and cwmJune McEnroe 2021-02-07Set urgency on bell in xtermJune McEnroe 2021-02-07Add bindings for brightness controlJune McEnroe 2021-02-07Set X key repeat rateJune McEnroe 2021-02-07Bump font size to 12June McEnroe 2021-02-07Fully configure and rebind cwmJune McEnroe 2021-02-07Add BintiJune McEnroe 2021-02-07Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe 2021-02-06Add xterm output to schemeJune McEnroe