diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kike.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -638,16 +638,16 @@ irc_handle_nick (const struct irc_message *msg, struct client *c) irc_send_reply (c, IRC_ERR_ERRONEOUSNICKNAME, nickname); return; } - if (str_map_find (&ctx->users, nickname)) - { - irc_send_reply (c, IRC_ERR_NICKNAMEINUSE, nickname); - return; - } if (c->nickname) { str_map_set (&ctx->users, c->nickname, NULL); free (c->nickname); } + if (str_map_find (&ctx->users, nickname)) + { + irc_send_reply (c, IRC_ERR_NICKNAMEINUSE, nickname); + return; + } // Allocate the nickname c->nickname = xstrdup (nickname); |