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 /irc_user.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 'irc_user.c')
| -rw-r--r-- | irc_user.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| @@ -119,11 +119,13 @@ irc_user_t *irc_user_by_name( irc_t *irc, const char *nick )  int irc_user_set_nick( irc_user_t *iu, const char *new )  {  	irc_t *irc = iu->irc; +	irc_user_t *new_iu;  	char key[strlen(new)+1];  	GSList *cl;  	strcpy( key, new ); -	if( iu == NULL || !nick_lc( key ) || irc_user_by_name( irc, new ) ) +	if( iu == NULL || !nick_lc( key ) || +	    ( ( new_iu = irc_user_by_name( irc, new ) ) && new_iu != iu ) )  		return 0;  	for( cl = irc->channels; cl; cl = cl->next ) | 
