summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-25 03:00:36 -0500
committerJune McEnroe <june@causal.agency>2020-02-25 03:00:36 -0500
commit78b4832bfe10b90e522bbb51c05ee19a361bf318 (patch)
tree201e7e7a34f217bbb2062ac61ef3f1fc745c84cc
parentHandle changing setParamModes, paramModes and other channel modes (diff)
downloadcatgirl-78b4832bfe10b90e522bbb51c05ee19a361bf318.tar.gz
catgirl-78b4832bfe10b90e522bbb51c05ee19a361bf318.zip
Add raw modes to mode message
-rw-r--r--handle.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/handle.c b/handle.c
index 4cb0e94..58fdce2 100644
--- a/handle.c
+++ b/handle.c
@@ -584,10 +584,15 @@ static void handleMode(struct Message *msg) {
 			);
 		}
 	}
-	if (strlen(buf) < 2) return;
+
+	catf(buf, sizeof(buf), " (%s", msg->params[1]);
+	for (uint i = 2; i < ParamCap; ++i) {
+		if (!msg->params[i]) break;
+		catf(buf, sizeof(buf), " %s", msg->params[i]);
+	}
 	uiFormat(
 		id, Cold, tagTime(msg),
-		"\3%02d%s\3\t%s", hash(msg->user), msg->nick, &buf[2]
+		"\3%02d%s\3\t%s)", hash(msg->user), msg->nick, &buf[2]
 	);
 }
 
ter.sh?id=62b345dc27d1fa61c6dbe9e02b684f6efe347280&follow=1'>Hide line numbers when rendering mdocJune McEnroe Hack: output an extra <td> after rendering mdoc so that line numbers can be hidden based on there being three. This required splitting source-filter and about-filter since on about pages there is no table. 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe :target persists after you click on something else. 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe NULs in the input cause an infinite loop in htmlEscape, not to mention regexes obviously not working, etc. 2019-12-16Post "cgit setup"June McEnroe