Ignore:
Timestamp:
2007-04-19T06:03:43Z (17 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d323394c
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
  • protocols/yahoo/libyahoo2.c

    r33dc261 rf0cb961  
    24032403                where = "Unknown";
    24042404
    2405         bud = y_new0(struct yahoo_buddy, 1);
    2406         bud->id = strdup(who);
    2407         bud->group = strdup(where);
    2408         bud->real_name = NULL;
    2409 
    2410         yd->buddies = y_list_append(yd->buddies, bud);
     2405        /* status: 0 == Successful, 1 == Error (does not exist), 2 == Already in list */
     2406        if( status == 0 ) {
     2407                bud = y_new0(struct yahoo_buddy, 1);
     2408                bud->id = strdup(who);
     2409                bud->group = strdup(where);
     2410                bud->real_name = NULL;
     2411               
     2412                yd->buddies = y_list_append(yd->buddies, bud);
     2413               
     2414                /* Possibly called already, but at least the call above doesn't
     2415                   seem to happen every time (not anytime I tried). */
     2416                YAHOO_CALLBACK(ext_yahoo_contact_added)(yd->client_id, me, who, NULL);
     2417        }
    24112418
    24122419/*      YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, who, status, NULL, (status==YAHOO_STATUS_AVAILABLE?0:1)); */
Note: See TracChangeset for help on using the changeset viewer.