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

crashed with servers that didn't automatically set any user mode

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@177 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-04-26 10:13:29 +00:00 committed by cras
parent 2b711f1383
commit d4195b31a2

View File

@ -336,8 +336,9 @@ static int sig_set_user_mode(IRC_SERVER_REC *server)
return 0; /* got disconnected */ return 0; /* got disconnected */
mode = settings_get_str("default_user_mode"); mode = settings_get_str("default_user_mode");
newmode = modes_join(server->usermode, mode); newmode = server->usermode == NULL ? NULL :
if (strcmp(newmode, server->usermode) != 0) modes_join(server->usermode, mode);
if (server->usermode == NULL || strcmp(newmode, server->usermode) != 0)
irc_send_cmdv(server, "MODE %s %s", server->nick, mode); irc_send_cmdv(server, "MODE %s %s", server->nick, mode);
g_free(newmode); g_free(newmode);
return 0; return 0;