about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-13 13:49:03 -0400
committerJune McEnroe <june@causal.agency>2018-08-13 13:49:03 -0400
commit2ae5b6b9ab2a528425c1c5265b04bb01a5246e29 (patch)
tree499faf3fd2401818005aed8c3af56206b224830b /handle.c
parentFactor out input param and add tagFind (diff)
downloadcatgirl-2ae5b6b9ab2a528425c1c5265b04bb01a5246e29.tar.gz
catgirl-2ae5b6b9ab2a528425c1c5265b04bb01a5246e29.zip
Add /query, /part and /close
Closing a channel before parting it is a bit weird, but if I send a PART
on /close, it would get reopened again to show the part message.
Diffstat (limited to '')
-rw-r--r--handle.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index 4d2d4b1..80ed1b4 100644
--- a/handle.c
+++ b/handle.c
@@ -122,12 +122,15 @@ static void handleJoin(char *prefix, char *params) {
 	char *nick, *user, *chan;
 	shift(prefix, &nick, &user, NULL, params, 1, 0, &chan);
 	struct Tag tag = tagFor(chan);
+	if (isSelf(nick, user)) {
+		tabTouch(TAG_NONE, chan);
+		uiViewTag(tag);
+	}
 	tabTouch(tag, nick);
 	uiFmt(
 		tag, "\3%d%s\3 arrives in \3%d%s\3",
 		color(user), nick, color(chan), chan
 	);
-	if (isSelf(nick, user)) uiViewTag(tag);
 }
 
 static void handlePart(char *prefix, char *params) {