Changeset 6ef9065 for protocols/nogaim.c


Ignore:
Timestamp:
2010-06-07T21:09:33Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f1cea66
Parents:
619dd18
Message:

Restored nick_hint/nick_source functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r619dd18 r6ef9065  
    418418void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick )
    419419{
    420 #if 0
    421         user_t *u = user_findhandle( ic, handle );
    422         char newnick[MAX_NICK_LENGTH+1], *orig_nick;
    423        
    424         if( u && !u->online && !nick_saved( ic->acc, handle ) )
    425         {
    426                 /* Only do this if the person isn't online yet (which should
    427                    be the case if we just added it) and if the user hasn't
    428                    assigned a nickname to this buddy already. */
    429                
    430                 strncpy( newnick, nick, MAX_NICK_LENGTH );
    431                 newnick[MAX_NICK_LENGTH] = 0;
    432                
    433                 /* Some processing to make sure this string is a valid IRC nickname. */
    434                 nick_strip( newnick );
    435                 if( set_getbool( &ic->bee->set, "lcnicks" ) )
    436                         nick_lc( newnick );
    437                
    438                 if( strcmp( u->nick, newnick ) != 0 )
    439                 {
    440                         /* Only do this if newnick is different from the current one.
    441                            If rejoining a channel, maybe we got this nick already
    442                            (and dedupe would only add an underscore. */
    443                         nick_dedupe( ic->acc, handle, newnick );
    444                        
    445                         /* u->nick will be freed halfway the process, so it can't be
    446                            passed as an argument. */
    447                         orig_nick = g_strdup( u->nick );
    448                         user_rename( ic->irc, orig_nick, newnick );
    449                         g_free( orig_nick );
    450                 }
    451         }
    452 #endif
     420        bee_t *bee = ic->bee;
     421        bee_user_t *bu = bee_user_by_handle( bee, ic, handle );
     422       
     423        if( !bu || !nick ) return;
     424       
     425        if( bee->ui->user_nick_hint )
     426                bee->ui->user_nick_hint( bee, bu, nick );
    453427}
    454428
Note: See TracChangeset for help on using the changeset viewer.