Mercurial > pidgin.yaz
diff libpurple/protocols/yahoo/yahoo.c @ 27855:0e732ea68e50
put a type 97 hash on sending a custom status mesagge in yahoo_set_idle()
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Wed, 11 Jun 2008 13:04:34 +0000 |
parents | d201287d3a0e |
children | ea73d3aca380 |
line wrap: on
line diff
--- 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