mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
User mode wasn't set right after server reconnection if server didn't
set any user mode for you automatically. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@429 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
20e88f4210
commit
f369248f68
@ -345,8 +345,15 @@ static int sig_set_user_mode(IRC_SERVER_REC *server)
|
||||
|
||||
newmode = server->usermode == NULL ? NULL :
|
||||
modes_join(server->usermode, mode);
|
||||
if (server->usermode != NULL && strcmp(newmode, server->usermode) != 0)
|
||||
irc_send_cmdv(server, "MODE %s -%s+%s", server->nick, server->usermode, mode);
|
||||
|
||||
if (server->usermode == NULL) {
|
||||
/* server didn't set user mode, just set the new one */
|
||||
irc_send_cmdv(server, "MODE %s %s", server->nick, mode);
|
||||
} else {
|
||||
if (strcmp(newmode, server->usermode) != 0)
|
||||
irc_send_cmdv(server, "MODE %s -%s+%s", server->nick, server->usermode, mode);
|
||||
}
|
||||
|
||||
g_free_not_null(newmode);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user