Ignore:
Timestamp:
2009-10-10T13:48:44Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
037b66a
Parents:
fa295e36
Message:

More Yahoo! fixes: Adding and removing buddies works, and for the first
time buddy add requests are actually handled; from what I can see this
simply didn't exist in libyahoo2 yet so far. :-(

I melded pieces of changes from http://geny.sf.net/ to make this stuff
work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    rfa295e36 rba16895  
    348348}
    349349
     350static void byahoo_auth_allow( struct im_connection *ic, const char *who )
     351{
     352        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
     353       
     354        yahoo_accept_buddy_ymsg13( yd->y2_id, NULL, who );
     355}
     356
     357static void byahoo_auth_deny( struct im_connection *ic, const char *who )
     358{
     359        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
     360       
     361        yahoo_reject_buddy_ymsg13( yd->y2_id, NULL, who, NULL );
     362}
     363
    350364void byahoo_initmodule( )
    351365{
     
    372386
    373387        ret->handle_cmp = g_strcasecmp;
     388       
     389        ret->auth_allow = byahoo_auth_allow;
     390        ret->auth_deny = byahoo_auth_deny;
    374391       
    375392        register_protocol(ret);
     
    922939}
    923940
     941void ext_yahoo_contact_auth_request( int id, const char *myid, const char *who, const char *msg )
     942{
     943        struct im_connection *ic = byahoo_get_ic_by_id( id );
     944       
     945        imcb_ask_auth( ic, who, NULL );
     946}
     947
    924948void ext_yahoo_contact_added( int id, const char *myid, const char *who, const char *msg )
    925949{
    926         /* Groups schmoups. If I want to handle groups properly I can get the
    927            buddy data from some internal libyahoo2 structure. */
    928         imcb_add_buddy( byahoo_get_ic_by_id( id ), (char*) who, NULL );
     950        struct im_connection *ic = byahoo_get_ic_by_id( id );
     951       
     952        imcb_add_buddy( ic, (char*) who, NULL );
    929953}
    930954
Note: See TracChangeset for help on using the changeset viewer.