diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/server-reconnect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/irc/core/server-reconnect.c b/src/irc/core/server-reconnect.c index 1edfe187..a00b32cf 100644 --- a/src/irc/core/server-reconnect.c +++ b/src/irc/core/server-reconnect.c @@ -335,8 +335,9 @@ static int sig_set_user_mode(IRC_SERVER_REC *server) mode = server->connrec->usermode; if (mode == NULL) return 0; - 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+%s", server->nick, server->usermode, mode); g_free(newmode); return 0; |