Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r5b52a48 ra36b030  
    121121}
    122122
    123 static void byahoo_login( account_t *acc )
    124 {
    125         struct gaim_connection *gc = new_gaim_conn( acc );
     123static void byahoo_login( struct aim_user *user )
     124{
     125        struct gaim_connection *gc = new_gaim_conn( user );
    126126        struct byahoo_data *yd = gc->proto_data = g_new0( struct byahoo_data, 1 );
    127127       
     
    130130       
    131131        set_login_progress( gc, 1, "Connecting" );
    132         yd->y2_id = yahoo_init( acc->user, acc->pass );
     132        yd->y2_id = yahoo_init( user->username, user->password );
    133133        yahoo_login( yd->y2_id, yd->current_status );
    134134}
     
    192192        gc->away = NULL;
    193193       
    194         if( msg )
     194        if( state && msg && g_strcasecmp( state, msg ) != 0 )
    195195        {
    196196                yd->current_status = YAHOO_STATUS_CUSTOM;
    197197                gc->away = "";
    198198        }
    199         if( state )
    200         {
     199        else if( state )
     200        {
     201                /* Set msg to NULL since (if it isn't NULL already) it's equal
     202                   to state. msg must be empty if we want to use an existing
     203                   away state. */
     204                msg = NULL;
     205               
    201206                gc->away = "";
    202207                if( g_strcasecmp( state, "Available" ) == 0 )
     
    235240                yd->current_status = YAHOO_STATUS_AVAILABLE;
    236241       
    237         if( yd->current_status == YAHOO_STATUS_INVISIBLE )
    238                 yahoo_set_away( yd->y2_id, yd->current_status, NULL, gc->away != NULL );
    239         else
    240                 yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );
     242        yahoo_set_away( yd->y2_id, yd->current_status, msg, gc->away != NULL );
    241243}
    242244
     
    409411        ret->chat_leave = byahoo_chat_leave;
    410412        ret->chat_open = byahoo_chat_open;
    411 
    412         ret->handle_cmp = g_strcasecmp;
     413        ret->cmp_buddynames = g_strcasecmp;
    413414       
    414415        register_protocol(ret);
     
    426427                yd = gc->proto_data;
    427428               
    428                 if( strcmp( gc->acc->prpl->name, "yahoo" ) == 0 && yd->y2_id == id )
     429                if( !strcmp(gc->prpl->name, "yahoo") && yd->y2_id == id )
    429430                        return( gc );
    430431        }
Note: See TracChangeset for help on using the changeset viewer.