summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-10 20:24:07 -0500
committerC. McEnroe2020-02-10 20:24:07 -0500
commit80a79467efca8f17e440cb63009c60dd8e78cc63 (patch)
tree96c3e7e1bb3c3f1fad88976fc359307688f75f13 /handle.c
parent00f0f94fc80ebecff531388e38d0fb121e3f4e74 (diff)
Only automatically switch to expected joins
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c6
1 files changed, 5 insertions, 1 deletions
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)) {