diff options
author | June McEnroe | 2022-05-08 16:39:31 -0400 |
---|---|---|
committer | June McEnroe | 2022-05-08 16:39:31 -0400 |
commit | 7ee327ccb6b290dd189346ef91ddf1a97818833e (patch) | |
tree | f4d1e09668f1487fb81b4438bf986d98062515d7 /handle.c | |
parent | 6cfb1ad301136446811b9bf09a47e27cc0f11278 (diff) |
Show "You arrive" message only once
Diffstat (limited to 'handle.c')
-rw-r--r-- | handle.c | 12 |
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); |