From 9a9b520df6044cfc034f9736fb97660a46e879b9 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 8 Jul 2010 23:31:01 +0100 Subject: 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. --- root_commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'root_commands.c') 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] ); } -- cgit v1.2.3