Ignore:
Timestamp:
2009-11-23T23:00:54Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
cd741d8
Parents:
b3117f2 (diff), fb51d85 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging BitlBee 1.2.4+

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    rb3117f2 r4e04194  
    254254static GList *byahoo_away_states( struct im_connection *ic )
    255255{
    256         GList *m = NULL;
    257 
    258         m = g_list_append( m, "Available" );
    259         m = g_list_append( m, "Be Right Back" );
    260         m = g_list_append( m, "Busy" );
    261         m = g_list_append( m, "Not At Home" );
    262         m = g_list_append( m, "Not At Desk" );
    263         m = g_list_append( m, "Not In Office" );
    264         m = g_list_append( m, "On Phone" );
    265         m = g_list_append( m, "On Vacation" );
    266         m = g_list_append( m, "Out To Lunch" );
    267         m = g_list_append( m, "Stepped Out" );
    268         m = g_list_append( m, "Invisible" );
    269         m = g_list_append( m, GAIM_AWAY_CUSTOM );
     256        static GList *m = NULL;
     257
     258        if( m == NULL )
     259        {
     260                m = g_list_append( m, "Available" );
     261                m = g_list_append( m, "Be Right Back" );
     262                m = g_list_append( m, "Busy" );
     263                m = g_list_append( m, "Not At Home" );
     264                m = g_list_append( m, "Not At Desk" );
     265                m = g_list_append( m, "Not In Office" );
     266                m = g_list_append( m, "On Phone" );
     267                m = g_list_append( m, "On Vacation" );
     268                m = g_list_append( m, "Out To Lunch" );
     269                m = g_list_append( m, "Stepped Out" );
     270                m = g_list_append( m, "Invisible" );
     271                m = g_list_append( m, GAIM_AWAY_CUSTOM );
     272        }
    270273       
    271274        return m;
     
    346349       
    347350        return c;
     351}
     352
     353static void byahoo_auth_allow( struct im_connection *ic, const char *who )
     354{
     355        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
     356       
     357        yahoo_accept_buddy_ymsg13( yd->y2_id, NULL, who );
     358}
     359
     360static void byahoo_auth_deny( struct im_connection *ic, const char *who )
     361{
     362        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
     363       
     364        yahoo_reject_buddy_ymsg13( yd->y2_id, NULL, who, NULL );
    348365}
    349366
     
    373390        ret->handle_cmp = g_strcasecmp;
    374391       
     392        ret->auth_allow = byahoo_auth_allow;
     393        ret->auth_deny = byahoo_auth_deny;
     394       
    375395        register_protocol(ret);
    376396}
     
    452472        struct byahoo_write_ready_data *d = data;
    453473       
    454         yahoo_write_ready( d->id, d->fd, d->data );
    455        
    456         return FALSE;
     474        return yahoo_write_ready( d->id, d->fd, d->data );
    457475}
    458476
     
    922940}
    923941
     942void ext_yahoo_contact_auth_request( int id, const char *myid, const char *who, const char *msg )
     943{
     944        struct im_connection *ic = byahoo_get_ic_by_id( id );
     945       
     946        imcb_ask_auth( ic, who, NULL );
     947}
     948
    924949void ext_yahoo_contact_added( int id, const char *myid, const char *who, const char *msg )
    925950{
    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 );
     951        struct im_connection *ic = byahoo_get_ic_by_id( id );
     952       
     953        imcb_add_buddy( ic, (char*) who, NULL );
    929954}
    930955
Note: See TracChangeset for help on using the changeset viewer.