1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

keep own ops status on /upgrade

This commit is contained in:
Ailin Nemui 2021-12-13 15:32:30 +01:00
parent 8281b10310
commit 60cb9451b3

View File

@ -43,13 +43,6 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
g_return_if_fail(data != NULL);
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* You joined, do not massjoin */
send_massjoin = FALSE;
} else {
send_massjoin = TRUE;
}
params = event_get_params(data, 3, &channel, &account, &realname);
ptr = strchr(channel, 7); /* ^G does something weird.. */
@ -62,6 +55,19 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
return;
}
if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* do not overwrite our /UPGRADEd ownnick */
if (chanrec->session_rejoin) {
g_free(params);
return;
} else {
/* You joined, do not massjoin */
send_massjoin = FALSE;
}
} else {
send_massjoin = TRUE;
}
/* check that the nick isn't already in nicklist. seems to happen
sometimes (server desyncs or something?) */
nickrec = nicklist_find(CHANNEL(chanrec), nick);