about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-08 22:55:11 -0500
committerJune McEnroe <june@causal.agency>2020-02-08 22:55:11 -0500
commitec73174c4c90ada7cad983f91ce42f27faa9749c (patch)
tree5345ee1a47ce5bbf0c3ddd028868d5e23177926a
parentColor mentions (diff)
downloadcatgirl-ec73174c4c90ada7cad983f91ce42f27faa9749c.tar.gz
catgirl-ec73174c4c90ada7cad983f91ce42f27faa9749c.zip
Use unexpected NAMES replies to populate complete
-rw-r--r--handle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index 4ec0a90..b4601e4 100644
--- a/handle.c
+++ b/handle.c
@@ -292,7 +292,6 @@ static void handleQuit(struct Message *msg) {
 
 static void handleReplyNames(struct Message *msg) {
 	require(msg, false, 4);
-	if (!replies.names) return;
 	size_t id = idFor(msg->params[2]);
 	char buf[1024];
 	size_t len = 0;
@@ -303,6 +302,7 @@ static void handleReplyNames(struct Message *msg) {
 		char *user = strsep(&name, "@");
 		enum Color color = (user ? hash(user) : Default);
 		completeAdd(id, nick, color);
+		if (!replies.names) continue;
 		int n = snprintf(
 			&buf[len], sizeof(buf) - len,
 			"%s\3%02d%s\3", (len ? ", " : ""), color, nick
@@ -310,6 +310,7 @@ static void handleReplyNames(struct Message *msg) {
 		assert(n > 0 && len + n < sizeof(buf));
 		len += n;
 	}
+	if (!replies.names) return;
 	uiFormat(
 		id, Cold, tagTime(msg),
 		"In \3%02d%s\3 are %s",
pan title='2015-08-13 15:40:27 +0200'>2015-08-13ui-shared: show full date in tooltip if longer ago than max_relativeJohn Keeping 2015-08-13ui-shared: use common function in print_rel_date()John Keeping 2015-08-13ui-shared: extract date formatting to a functionJohn Keeping 2015-08-13filter: don't use dlsym unnecessarilyJohn Keeping 2015-08-13ui-tree: use "sane" isgraph()John Keeping 2015-08-13cgit.h: move stdbool.h from ui-shared.hJohn Keeping 2015-08-13cache.c: fix header orderJohn Keeping 2015-08-13configfile.c: don't include system headers directlyJohn Keeping 2015-08-13Remove redundant includesJohn Keeping 2015-08-13Makefile: include Git's config.mak.unameJohn Keeping 2015-08-13tests: allow shell to be overriddenJohn Keeping 2015-08-13redirect: cleanlinessJason A. Donenfeld 2015-08-13redirect: be more careful for different cgi setupsJason A. Donenfeld 2015-08-12ui-log: fix double countingJohn Keeping 2015-08-12log: allow users to follow a fileJohn Keeping 2015-08-12shared: make cgit_diff_tree_cb publicJohn Keeping 2015-08-12t0110: Chain together using &&Jason A. Donenfeld 2015-08-12about: always ensure page has a trailing slashJason A. Donenfeld 2015-08-12filters: apply HTML escapingLazaros Koromilas 2015-08-12git: update to v2.5.0Christian Hesse 2015-08-12Fix processing of repo.hide and repo.ignoreDaniel Reichelt