summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-15 05:29:54 -0500
committerJune McEnroe <june@causal.agency>2020-02-15 05:29:54 -0500
commit9b1ab699084190b23953bff7f4ce5410808ab850 (patch)
tree8795886c47dd89d000831f5877676c4a18c83ec7
parentShow prefixes in NAMES and WHOIS replies (diff)
downloadcatgirl-9b1ab699084190b23953bff7f4ce5410808ab850.tar.gz
catgirl-9b1ab699084190b23953bff7f4ce5410808ab850.zip
Track PREFIX modes and CHANMODES
Diffstat (limited to '')
-rw-r--r--chat.h5
-rw-r--r--handle.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/chat.h b/chat.h
index bb15b3d..ade2ffc 100644
--- a/chat.h
+++ b/chat.h
@@ -87,6 +87,11 @@ extern struct Network {
 	char *name;
 	char *chanTypes;
 	char *prefixes;
+	char *prefixModes;
+	char *listModes;
+	char *paramModes;
+	char *setParamModes;
+	char *channelModes;
 } network;
 
 extern struct Self {
diff --git a/handle.c b/handle.c
index 6447634..b68ae45 100644
--- a/handle.c
+++ b/handle.c
@@ -220,9 +220,14 @@ static void handleReplyISupport(struct Message *msg) {
 		} else if (!strcmp(key, "CHANTYPES")) {
 			set(&network.chanTypes, msg->params[i]);
 		} else if (!strcmp(key, "PREFIX")) {
-			strsep(&msg->params[i], ")");
-			if (!msg->params[i]) continue;
+			strsep(&msg->params[i], "(");
+			set(&network.prefixModes, strsep(&msg->params[i], ")"));
 			set(&network.prefixes, msg->params[i]);
+		} else if (!strcmp(key, "CHANMODES")) {
+			set(&network.listModes, strsep(&msg->params[i], ","));
+			set(&network.paramModes, strsep(&msg->params[i], ","));
+			set(&network.setParamModes, strsep(&msg->params[i], ","));
+			set(&network.channelModes, strsep(&msg->params[i], ","));
 		}
 	}
 }
td>2019-07-27Move pdf script to MakefileJune McEnroe 2019-07-27Update macOS neovim to 0.3.8June McEnroe Which somehow still doesn't include my man fix. 2019-07-27Rewrite port makefiles consistentlyJune McEnroe 2019-07-27Rewrite Makefile once more with more organizationJune McEnroe 2019-07-27Reference png.h in bin.7June McEnroe 2019-07-27Revert "Use scheme to style HTMLs"June McEnroe This reverts commit 46237a457ff3c9a813a56f2a442c115bf8610cbc. I don't know why but I don't like it. 2019-07-27Remove scheme text linkJune McEnroe No standard base64 encoder so no way to maintain it. 2019-07-26Update Dark.terminalJune McEnroe Why are the blobs so much bigger now? 2019-07-26Lighten dark whiteJune McEnroe 2019-07-25Add png.3 man pageJune McEnroe 2019-07-25Use scheme to style HTMLsJune McEnroe 2019-07-25Don't match comments in strings in makeJune McEnroe 2019-07-25Generate index.html with links from bin.7June McEnroe 2019-07-24Warn when date has changedJune McEnroe 2019-07-24Add whenJune McEnroe When? Now. 2019-07-24Remove histedit from bitJune McEnroe