diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-04 21:00:02 -0400 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-04-04 21:00:02 -0400 | 
| commit | 57c96f7be2511a0a50015512dc03a30ba0923862 (patch) | |
| tree | c3ae43a58ab269ca916e160b3b46445570bf30d5 /irc_user.c | |
| parent | 0b5cc72bc7b4192ff5b474b81038c299d03721f1 (diff) | |
Restored the rename command.
Diffstat (limited to 'irc_user.c')
| -rw-r--r-- | irc_user.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| @@ -82,9 +82,9 @@ irc_user_t *irc_user_by_name( irc_t *irc, const char *nick )  		return NULL;  } -int irc_user_set_nick( irc_t *irc, const char *old, const char *new ) +int irc_user_set_nick( irc_user_t *iu, const char *new )  { -	irc_user_t *iu = irc_user_by_name( irc, old ); +	irc_t *irc = iu->irc;  	char key[strlen(new)+1];  	GSList *cl; @@ -99,7 +99,7 @@ int irc_user_set_nick( irc_t *irc, const char *old, const char *new )  		/* Send a NICK update if we're renaming our user, or someone  		   who's in the same channel like our user. */  		if( iu == irc->user || -		    ( irc_channel_has_user( ic, irc->user ) && +		    ( ( ic->flags & IRC_CHANNEL_JOINED ) &&  		      irc_channel_has_user( ic, iu ) ) )  		{  			irc_send_nick( iu, new ); | 
