Ignore:
Timestamp:
2010-03-06T17:10:32Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
0714d51
Parents:
17f9522
Message:

Fixed up Yahoo! I'll have to do some more thorough testing of this code
since I may have broken something.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/yahoo.c

    r17f9522 r4049061  
    130130{
    131131        set_add( &acc->set, "mail_notifications", "false", set_eval_bool, acc );
     132       
     133        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE;
    132134}
    133135
     
    197199{
    198200        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
    199         char *away;
    200        
    201         away = NULL;
    202        
    203         if( state && msg && g_strcasecmp( state, msg ) != 0 )
    204         {
    205                 yd->current_status = YAHOO_STATUS_CUSTOM;
    206                 away = "";
    207         }
    208         else if( state )
    209         {
    210                 /* Set msg to NULL since (if it isn't NULL already) it's equal
    211                    to state. msg must be empty if we want to use an existing
    212                    away state. */
    213                 msg = NULL;
    214                
    215                 away = "";
    216                 if( g_strcasecmp( state, "Available" ) == 0 )
    217                 {
    218                         yd->current_status = YAHOO_STATUS_AVAILABLE;
    219                         away = NULL;
    220                 }
    221                 else if( g_strcasecmp( state, "Be Right Back" ) == 0 )
     201       
     202        if( state )
     203        {
     204                if( g_strcasecmp( state, "Be Right Back" ) == 0 )
    222205                        yd->current_status = YAHOO_STATUS_BRB;
    223206                else if( g_strcasecmp( state, "Busy" ) == 0 )
     
    239222                else if( g_strcasecmp( state, "Invisible" ) == 0 )
    240223                        yd->current_status = YAHOO_STATUS_INVISIBLE;
    241                 else if( g_strcasecmp( state, GAIM_AWAY_CUSTOM ) == 0 )
    242                 {
    243                         yd->current_status = YAHOO_STATUS_AVAILABLE;
    244                        
    245                         away = NULL;
    246                 }
     224                else
     225                        yd->current_status = YAHOO_STATUS_CUSTOM;
    247226        }
    248227        else
    249228                yd->current_status = YAHOO_STATUS_AVAILABLE;
    250229       
    251         yahoo_set_away( yd->y2_id, yd->current_status, msg, away != NULL ? 2 : 0 );
     230        yahoo_set_away( yd->y2_id, yd->current_status, msg, state ? 2 : 0 );
    252231}
    253232
     
    258237        if( m == NULL )
    259238        {
    260                 m = g_list_append( m, "Available" );
    261239                m = g_list_append( m, "Be Right Back" );
    262240                m = g_list_append( m, "Busy" );
     
    269247                m = g_list_append( m, "Stepped Out" );
    270248                m = g_list_append( m, "Invisible" );
    271                 m = g_list_append( m, GAIM_AWAY_CUSTOM );
    272249        }
    273250       
Note: See TracChangeset for help on using the changeset viewer.