Show "You arrive" message only once

weechat-hashes
June McEnroe 2022-05-08 16:39:31 -04:00
parent 6cfb1ad301
commit 7ee327ccb6
1 changed files with 8 additions and 4 deletions

View File

@ -276,10 +276,14 @@ static void handleReplyISupport(struct Message *msg) {
if (!strcmp(key, "NETWORK")) { if (!strcmp(key, "NETWORK")) {
if (!msg->params[i]) continue; if (!msg->params[i]) continue;
set(&network.name, msg->params[i]); set(&network.name, msg->params[i]);
static bool arrived;
if (!arrived) {
uiFormat( uiFormat(
Network, Cold, tagTime(msg), Network, Cold, tagTime(msg),
"You arrive in %s", msg->params[i] "You arrive in %s", msg->params[i]
); );
arrived = true;
}
} else if (!strcmp(key, "USERLEN")) { } else if (!strcmp(key, "USERLEN")) {
if (!msg->params[i]) continue; if (!msg->params[i]) continue;
network.userLen = strtoul(msg->params[i], NULL, 10); network.userLen = strtoul(msg->params[i], NULL, 10);