Mercurial > pidgin.yaz
changeset 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 | fcd28c88459b |
children | ea73d3aca380 |
files | libpurple/protocols/yahoo/yahoo.c |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
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