diff options
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 daaebb95..cf448e8d 100644 --- a/root_commands.c +++ b/root_commands.c @@ -679,7 +679,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] ); @@ -695,7 +695,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] ); } |