aboutsummaryrefslogtreecommitdiffstats
path: root/root_commands.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-07-10 00:25:07 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-07-10 00:25:07 +0100
commitb556e46f9bfeeb630b45a3c0f0951110ac3de0f2 (patch)
tree503b810a5e9322b444dc7e84e4d8535dc0f4807e /root_commands.c
parentc5bff810e6919dc3daf7f82f761197a27f04538b (diff)
parent9a9b520df6044cfc034f9736fb97660a46e879b9 (diff)
Merging main ui-fix.
Diffstat (limited to 'root_commands.c')
-rw-r--r--root_commands.c4
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] );
}