Changeset 1962ac1


Ignore:
Timestamp:
2007-07-02T21:07:43Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
5d7dc00
Parents:
c377417
Message:

Fixed nick hint function to only set the nick if it's different from
the current one (otherwise the dedupe function will dedupe the nick
against itself).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    rc377417 r1962ac1  
    471471                        nick_lc( newnick );
    472472               
    473                 nick_dedupe( ic->acc, handle, newnick );
    474                
    475                 /* u->nick will be freed halfway the process, so it can't be
    476                    passed as an argument. */
    477                 orig_nick = g_strdup( u->nick );
    478                 user_rename( ic->irc, orig_nick, newnick );
    479                 g_free( orig_nick );
     473                if( strcmp( u->nick, newnick ) != 0 )
     474                {
     475                        /* Only do this if newnick is different from the current one.
     476                           If rejoining a channel, maybe we got this nick already
     477                           (and dedupe would only add an underscore. */
     478                        nick_dedupe( ic->acc, handle, newnick );
     479                       
     480                        /* u->nick will be freed halfway the process, so it can't be
     481                           passed as an argument. */
     482                        orig_nick = g_strdup( u->nick );
     483                        user_rename( ic->irc, orig_nick, newnick );
     484                        g_free( orig_nick );
     485                }
    480486        }
    481487}
Note: See TracChangeset for help on using the changeset viewer.