# HG changeset patch # User Yoshiki Yazawa # Date 1213189474 0 # Node ID 0e732ea68e50a0bd74ccdd064c79485b11e1fc24 # Parent fcd28c88459b04a87ab766a32424b7eb2909433e put a type 97 hash on sending a custom status mesagge in yahoo_set_idle() diff -r fcd28c88459b -r 0e732ea68e50 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Wed Jun 11 11:30:53 2008 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Jun 11 13:04:34 2008 +0000 @@ -3744,10 +3744,11 @@ } pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, 0); - if(!pkt) { // yaz - purple_debug_info("yahoo", "yahoo_set_idle: pkt == NULL\n"); - return; - } + if(!pkt) { // yaz + purple_debug_info("yahoo", "yahoo_set_idle: pkt == NULL\n"); + return; + } + yahoo_packet_hash_int(pkt, 10, yd->current_status); if (yd->current_status == YAHOO_STATUS_CUSTOM) { @@ -3800,12 +3801,14 @@ yahoo_packet_hash_int(pkt, 10, yd->current_status); if (yd->current_status == YAHOO_STATUS_CUSTOM) { const char *tmp; + gboolean utf8 = TRUE; if (status == NULL) status = purple_presence_get_active_status(purple_account_get_presence(purple_connection_get_account(gc))); tmp = purple_status_get_attr_string(status, "message"); if (tmp != NULL) { - msg = yahoo_string_encode(gc, tmp, NULL); + msg = yahoo_string_encode(gc, tmp, &utf8); msg2 = purple_markup_strip_html(msg); + yahoo_packet_hash_str(pkt, 97, utf8 ? "1" : 0); yahoo_packet_hash_str(pkt, 19, msg2); // yaz: pkt may be NULL. } else { /* get_yahoo_status_from_purple_status() returns YAHOO_STATUS_CUSTOM for