diff options
author | Timo Sirainen <cras@irssi.org> | 2000-04-26 10:13:29 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-04-26 10:13:29 +0000 |
commit | d4195b31a24805aac38ef006c099d60228980d34 (patch) | |
tree | af95d4f603c879279fddcace319777c2c9e30bbc /src/irc | |
parent | 2b711f13831a6eea5458a44c1d5d19dc5e0be966 (diff) | |
download | irssi-d4195b31a24805aac38ef006c099d60228980d34.zip |
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
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/core/irc-server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc/core/irc-server.c b/src/irc/core/irc-server.c index a02181e6..2f9e9fb1 100644 --- a/src/irc/core/irc-server.c +++ b/src/irc/core/irc-server.c @@ -336,8 +336,9 @@ static int sig_set_user_mode(IRC_SERVER_REC *server) return 0; /* got disconnected */ mode = settings_get_str("default_user_mode"); - newmode = modes_join(server->usermode, mode); - if (strcmp(newmode, server->usermode) != 0) + 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", server->nick, mode); g_free(newmode); return 0; |