summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-05-08 16:39:31 -0400
committerJune McEnroe <june@causal.agency>2022-05-08 16:39:31 -0400
commit7ee327ccb6b290dd189346ef91ddf1a97818833e (patch)
treef4d1e09668f1487fb81b4438bf986d98062515d7
parentWrite unknown replies to Network with Ice heat (diff)
downloadcatgirl-7ee327ccb6b290dd189346ef91ddf1a97818833e.tar.gz
catgirl-7ee327ccb6b290dd189346ef91ddf1a97818833e.zip
Show "You arrive" message only once
-rw-r--r--handle.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/handle.c b/handle.c
index 0baddf2..df21cbf 100644
--- a/handle.c
+++ b/handle.c
@@ -276,10 +276,14 @@ static void handleReplyISupport(struct Message *msg) {
 		if (!strcmp(key, "NETWORK")) {
 			if (!msg->params[i]) continue;
 			set(&network.name, msg->params[i]);
-			uiFormat(
-				Network, Cold, tagTime(msg),
-				"You arrive in %s", msg->params[i]
-			);
+			static bool arrived;
+			if (!arrived) {
+				uiFormat(
+					Network, Cold, tagTime(msg),
+					"You arrive in %s", msg->params[i]
+				);
+				arrived = true;
+			}
 		} else if (!strcmp(key, "USERLEN")) {
 			if (!msg->params[i]) continue;
 			network.userLen = strtoul(msg->params[i], NULL, 10);
'logheader'>2020-09-11Add influencer tweetJune McEnroe 2020-09-10Add The Kingdom of GodsJune McEnroe Reading has really slowed down :( 2020-09-07Add SunglassesJune McEnroe An IRC find. 2020-09-06Add Between the BreathsJune McEnroe One of those good songs from a soundtrack of a film that probably isn't? The summary sounds a lot more interesting than the title implies, at least. 2020-09-04Open /dev/tty in nudgeJune McEnroe This makes it work even when it's run connected to a pipe, i.e. as the notify command of catgirl... 2020-09-04Add nudgeJune McEnroe 2020-09-03Build fbclock with -lzJune McEnroe I guess this got lost somewhere, long ago... 2020-08-29Add tweets from retweetsJune McEnroe