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",
etworks.c?h=1.3&id=236dbaa81740a7c99bb3b07b4428f792b6c85e98&follow=1'>Filter networks with only private contexts from recents as wellJune McEnroe 2020-07-18Specify litterbox version in readmeJune McEnroe 2020-07-18Reverse order of X macro parameters for pages and keysJune McEnroe 2020-07-18Remove kcgi 0.11 compatibilityJune McEnroe 2020-07-17Filter networks with only private contextsJune McEnroe 2020-07-17Add export optionJune McEnroe 2020-07-17Add margin to inputsJune McEnroe 2020-07-16Don't write null terminator in stylesheet responseJune McEnroe 2020-07-16Remove sudo from make installJune McEnroe