diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-08 23:31:01 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-08 23:31:01 +0100 |
commit | 9a9b520df6044cfc034f9736fb97660a46e879b9 (patch) | |
tree | 16f45502a8b8d7e2c30c33b744605e70250f1c59 /root_commands.c | |
parent | 69b896b5967e5d13b1c60c68cb3bc7d4a0d5cd06 (diff) |
Allow nick changes if they're only different in capitalisation, fixed
faulty responses in the NICK command, and fixing crash bug in nick changes
before finishing login.
Diffstat (limited to 'root_commands.c')
-rw-r--r-- | root_commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/root_commands.c b/root_commands.c index 62fe1e79..5c5ead7b 100644 --- a/root_commands.c +++ b/root_commands.c @@ -661,7 +661,7 @@ static void cmd_info( irc_t *irc, char **cmd ) static void cmd_rename( irc_t *irc, char **cmd ) { - irc_user_t *iu; + irc_user_t *iu, *old; iu = irc_user_by_name( irc, cmd[1] ); @@ -677,7 +677,7 @@ static void cmd_rename( irc_t *irc, char **cmd ) { irc_usermsg( irc, "Nick `%s' is invalid", cmd[2] ); } - else if( irc_user_by_name( irc, cmd[2] ) ) + else if( ( old = irc_user_by_name( irc, cmd[2] ) ) && old != iu ) { irc_usermsg( irc, "Nick `%s' already exists", cmd[2] ); } |