Ignore:
Timestamp:
2010-08-14T21:33:33Z (11 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
d912fe4
Parents:
6ddb223
Message:

Add/Remove support.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/msn_util.c

    r6ddb223 r4fc95c5  
    7474}
    7575
    76 int msn_buddy_list_add( struct im_connection *ic, msn_buddy_flags_t list, const char *who, const char *realname_, const char *group )
     76int msn_buddy_list_add( struct im_connection *ic, msn_buddy_flags_t list, const char *who, const char *realname, const char *group )
    7777{
    7878        struct msn_data *md = ic->proto_data;
     
    131131#endif
    132132       
    133         if( !( bu = bee_user_by_handle( ic->bee, ic, who ) ) ||
     133        if( !( ( bu = bee_user_by_handle( ic->bee, ic, who ) ) ||
     134               ( bu = bee_user_new( ic->bee, ic, who, 0 ) ) ) ||
    134135            !( bd = bu->data ) || bd->flags & list )
    135136                return 1;
     
    137138        bd->flags |= list;
    138139       
    139         msn_soap_memlist_edit( ic, who, TRUE, list );
     140        if( list == MSN_BUDDY_FL )
     141                msn_soap_ab_contact_add( ic, bu );
     142        else
     143                msn_soap_memlist_edit( ic, who, TRUE, list );
    140144       
    141145        if( ( adl = adlrml_entry( who, list ) ) )
     
    179183        bd->flags &= ~list;
    180184       
    181         msn_soap_memlist_edit( ic, who, FALSE, list );
     185        if( list == MSN_BUDDY_FL )
     186                msn_soap_ab_contact_del( ic, bu );
     187        else
     188                msn_soap_memlist_edit( ic, who, FALSE, list );
    182189       
    183190        if( ( adl = adlrml_entry( who, list ) ) )
Note: See TracChangeset for help on using the changeset viewer.