Changeset be915f5


Ignore:
Timestamp:
2010-03-06T18:19:31Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
34fbbf9
Parents:
0714d51
Message:

Yahoo! fixes. Turns out the protocol really is somewhat odd.

Location:
protocols/yahoo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/yahoo/libyahoo2.c

    r0714d51 rbe915f5  
    40874087}
    40884088
    4089 /* TODO(wilmer): See if this this function still works since I got rid of a
    4090                  lot of things that seemed illogical. Some things may have
    4091                  been intentional. */
    40924089void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away)
    40934090{
     
    41184115        snprintf(s, sizeof(s), "%d", yd->current_status);
    41194116        yahoo_packet_hash(pkt, 10, s);
    4120         yahoo_packet_hash(pkt, 19, msg);
     4117        yahoo_packet_hash(pkt, 19, msg && state == YAHOO_STATUS_CUSTOM ? msg : "");
    41214118        yahoo_packet_hash(pkt, 47, (away == 2)? "2": (away) ?"1":"0");
    41224119        yahoo_send_packet(yid, pkt, 0);
  • protocols/yahoo/yahoo.c

    r0714d51 rbe915f5  
    200200        struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data;
    201201       
    202         if( state )
    203         {
     202        if( state && msg == NULL )
     203        {
     204                /* Use these states only if msg doesn't contain additional
     205                   info since away messages are only supported with CUSTOM. */
    204206                if( g_strcasecmp( state, "Be Right Back" ) == 0 )
    205207                        yd->current_status = YAHOO_STATUS_BRB;
     
    225227                        yd->current_status = YAHOO_STATUS_CUSTOM;
    226228        }
     229        else if( state )
     230                yd->current_status = YAHOO_STATUS_CUSTOM;
    227231        else
    228232                yd->current_status = YAHOO_STATUS_AVAILABLE;
Note: See TracChangeset for help on using the changeset viewer.