Changeset f0cb961 for root_commands.c


Ignore:
Timestamp:
2007-04-19T06:03:43Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d323394
Parents:
33dc261
Message:

More API changes: buddy list management. imcb_add_buddy() is now a *real*
callback, it's only called from inside IM-modules. This makes sure a buddy
only gets added to the BitlBee structures if the add was successful. This
gets rid of the weirdness described in #55. Unfortunately for now this
change breaks A) automatic renaming of ICQ contacts (if there are names
stored in the contact list) B) add -tmp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • root_commands.c

    r33dc261 rf0cb961  
    437437{
    438438        account_t *a;
    439         int add_for_real = 1;
     439        int add_on_server = 1;
    440440       
    441441        if( g_strcasecmp( cmd[1], "-tmp" ) == 0 )
    442442        {
    443                 add_for_real = 0;
     443                add_on_server = 0;
    444444                cmd ++;         /* So evil... :-D */
    445445        }
     
    476476        /* By making this optional, you can talk to people without having to
    477477           add them to your *real* (server-side) contact list. */
    478         if( add_for_real )
     478        if( add_on_server )
    479479                a->ic->acc->prpl->add_buddy( a->ic, cmd[2], NULL );
    480                
    481         add_buddy( a->ic, NULL, cmd[2], cmd[2] );
    482        
    483         irc_usermsg( irc, "User `%s' added to your contact list as `%s'", cmd[2], user_findhandle( a->ic, cmd[2] )->nick );
     480       
     481        /* add_buddy( a->ic, NULL, cmd[2], cmd[2] ); */
     482       
     483        irc_usermsg( irc, "Adding `%s' to your contact list", cmd[2] );
    484484}
    485485
Note: See TracChangeset for help on using the changeset viewer.