Mercurial > pidgin
changeset 10195:fa4973f356a1
[gaim-migrate @ 11310]
Minor updates to these 2 protocols. Yahoo! no longer crashes and
oscar is one step closer to being able to set an away message
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 16 Nov 2004 03:56:09 +0000 |
parents | 55ea700c49d4 |
children | 760e690a5f30 |
files | src/protocols/oscar/oscar.c src/protocols/yahoo/yahoo.c |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Tue Nov 16 03:53:41 2004 +0000 +++ b/src/protocols/oscar/oscar.c Tue Nov 16 03:56:09 2004 +0000 @@ -6876,9 +6876,11 @@ _("Available"), TRUE, TRUE, FALSE); status_types = g_list_append(status_types, type); - type = gaim_status_type_new_full(GAIM_STATUS_AWAY, - OSCAR_STATUS_ID_AWAY, - _("Away"), TRUE, TRUE, FALSE); + type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, + OSCAR_STATUS_ID_AWAY, + _("Away"), TRUE, TRUE, FALSE, + "message", _("Message"), + gaim_value_new(GAIM_TYPE_STRING), NULL); status_types = g_list_append(status_types, type); type = gaim_status_type_new_full(GAIM_STATUS_HIDDEN,
--- a/src/protocols/yahoo/yahoo.c Tue Nov 16 03:53:41 2004 +0000 +++ b/src/protocols/yahoo/yahoo.c Tue Nov 16 03:56:09 2004 +0000 @@ -3033,6 +3033,12 @@ if (yd->current_status == YAHOO_STATUS_CUSTOM) { const char *msg = gaim_status_get_attr_string(status, "message"); + + if (msg == NULL) { + gaim_debug_info("yahoo", "Attempted to set a NULL status message.\n"); + msg = ""; + } + conv_msg = yahoo_string_encode(gc, msg, NULL); conv_msg2 = gaim_markup_strip_html(conv_msg); yahoo_packet_hash(pkt, 19, conv_msg2); @@ -3157,7 +3163,7 @@ types = g_list_append(types, type); type = gaim_status_type_new_with_attrs(GAIM_STATUS_AWAY, "away", - "Away", TRUE, TRUE, FALSE, + _("Away"), TRUE, TRUE, FALSE, "message", _("Message"), gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type);