diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-06 17:10:32 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-06 17:10:32 +0000 |
commit | 4049061ea3b1fbe939c623a8501aea60906893ea (patch) | |
tree | 3c50acbc2a2c3b551cbed996ea55a070cf771716 /protocols/yahoo/libyahoo2.c | |
parent | 17f952299cd2780a2dfecc4d4b9861f6f0f4b1c2 (diff) |
Fixed up Yahoo! I'll have to do some more thorough testing of this code
since I may have broken something.
Diffstat (limited to 'protocols/yahoo/libyahoo2.c')
-rw-r--r-- | protocols/yahoo/libyahoo2.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/protocols/yahoo/libyahoo2.c b/protocols/yahoo/libyahoo2.c index 836670f7..20e284f7 100644 --- a/protocols/yahoo/libyahoo2.c +++ b/protocols/yahoo/libyahoo2.c @@ -4086,6 +4086,9 @@ void yahoo_send_typing(int id, const char *from, const char *who, int typ) yahoo_packet_free(pkt); } +/* TODO(wilmer): See if this this function still works since I got rid of a + lot of things that seemed illogical. Some things may have + been intentional. */ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away) { struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); @@ -4098,14 +4101,8 @@ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away) return; yd = yid->yd; - old_status = yd->current_status; - - if (msg && strncmp(msg,"Invisible",9)) { - yd->current_status = YAHOO_STATUS_CUSTOM; - } else { - yd->current_status = state; - } + yd->current_status = state; /* Thank you libpurple :) */ if (yd->current_status == YAHOO_STATUS_INVISIBLE) { @@ -4120,15 +4117,8 @@ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away) pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, yd->current_status, yd->session_id); snprintf(s, sizeof(s), "%d", yd->current_status); yahoo_packet_hash(pkt, 10, s); - - if (yd->current_status == YAHOO_STATUS_CUSTOM) { - yahoo_packet_hash(pkt, 19, msg); - } else { - yahoo_packet_hash(pkt, 19, ""); - } - + yahoo_packet_hash(pkt, 19, msg); yahoo_packet_hash(pkt, 47, (away == 2)? "2": (away) ?"1":"0"); - yahoo_send_packet(yid, pkt, 0); yahoo_packet_free(pkt); |