summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.h1
-rw-r--r--command.c1
-rw-r--r--handle.c6
3 files changed, 7 insertions, 1 deletions
diff --git a/chat.h b/chat.h
index 03a0a50..f47b244 100644
--- a/chat.h
+++ b/chat.h
@@ -120,6 +120,7 @@ void ircFormat(const char *format, ...)
 	__attribute__((format(printf, 1, 2)));
 
 extern struct Replies {
+	size_t join;
 	size_t topic;
 	size_t names;
 	size_t whois;
diff --git a/command.c b/command.c
index cab1d26..5cb43cf 100644
--- a/command.c
+++ b/command.c
@@ -86,6 +86,7 @@ static void commandJoin(size_t id, char *params) {
 		}
 	}
 	ircFormat("JOIN %s\r\n", (params ? params : idNames[id]));
+	replies.join += count;
 	replies.topic += count;
 	replies.names += count;
 }
diff --git a/handle.c b/handle.c
index fd2a67f..0db7fd9 100644
--- a/handle.c
+++ b/handle.c
@@ -164,6 +164,7 @@ static void handleReplyWelcome(struct Message *msg) {
 			if (*ch == ',') count++;
 		}
 		ircFormat("JOIN %s\r\n", self.join);
+		replies.join += count;
 		replies.topic += count;
 		replies.names += count;
 	}
@@ -211,7 +212,10 @@ static void handleJoin(struct Message *msg) {
 		}
 		idColors[id] = hash(msg->params[0]);
 		completeTouch(None, msg->params[0], idColors[id]);
-		uiShowID(id);
+		if (replies.join) {
+			uiShowID(id);
+			replies.join--;
+		}
 	}
 	completeTouch(id, msg->nick, hash(msg->user));
 	if (msg->params[2] && !strcasecmp(msg->params[2], msg->nick)) {
June McEnroe 2021-05-25import: Add missing scripts/wrap-compiler-for-flag-checkJune McEnroe 2021-05-08Import LibreSSL 3.3.3June McEnroe 2021-04-18build: Remove added x509_verify.3 links 3.3.2June McEnroe 2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe