comparison libpurple/protocols/yahoo/yahoochat.c @ 27590:a08e84032814

merge of '2348ff22f0ff3453774b8b25b36238465580c609' and 'e76f11543c2a4aa05bdf584f087cbe3439029661'
author Paul Aurich <paul@darkrain42.org>
date Sun, 12 Jul 2009 05:43:38 +0000
parents ef5f0cde8d74
children a0ea1bcfa1c4
comparison
equal deleted inserted replaced
27104:048bcf41deef 27590:a08e84032814
28 28
29 #include "internal.h" 29 #include "internal.h"
30 30
31 #ifdef HAVE_CONFIG_H 31 #ifdef HAVE_CONFIG_H
32 #include "config.h" 32 #include "config.h"
33 #endif 33 #endif /* HAVE_CONFIG_H */
34 34
35 #include "debug.h" 35 #include "debug.h"
36 #include "privacy.h" 36 #include "privacy.h"
37 #include "prpl.h" 37 #include "prpl.h"
38 38
39 #include "conversation.h" 39 #include "conversation.h"
40 #include "notify.h" 40 #include "notify.h"
41 #include "util.h" 41 #include "util.h"
42 42
43 #include "yahoo.h" 43 #include "libymsg.h"
44 #include "yahoo_packet.h" 44 #include "yahoo_packet.h"
45 #include "yahoochat.h" 45 #include "yahoochat.h"
46 #include "ycht.h" 46 #include "ycht.h"
47 47
48 #define YAHOO_CHAT_ID (1) 48 #define YAHOO_CHAT_ID (1)
646 /* we still get messages after we part, funny that */ 646 /* we still get messages after we part, funny that */
647 return; 647 return;
648 } 648 }
649 649
650 if (!msg) { 650 if (!msg) {
651 purple_debug(PURPLE_DEBUG_MISC, "yahoo", "Got a message packet with no message.\nThis probably means something important, but we're ignoring it.\n"); 651 purple_debug_misc("yahoo", "Got a message packet with no message.\nThis probably means something important, but we're ignoring it.\n");
652 return; 652 return;
653 } 653 }
654 msg2 = yahoo_string_decode(gc, msg, utf8); 654 msg2 = yahoo_string_decode(gc, msg, utf8);
655 msg = yahoo_codes_to_html(msg2); 655 msg = yahoo_codes_to_html(msg2);
656 g_free(msg2); 656 g_free(msg2);
1517 f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE); 1517 f = purple_roomlist_field_new(PURPLE_ROOMLIST_FIELD_STRING, _("Topic"), "topic", FALSE);
1518 fields = g_list_append(fields, f); 1518 fields = g_list_append(fields, f);
1519 1519
1520 purple_roomlist_set_fields(rl, fields); 1520 purple_roomlist_set_fields(rl, fields);
1521 1521
1522 if (purple_proxy_connect(NULL, account, yrl->host, 80, 1522 if (purple_proxy_connect(gc, account, yrl->host, 80,
1523 yahoo_roomlist_got_connected, yrl) == NULL) 1523 yahoo_roomlist_got_connected, yrl) == NULL)
1524 { 1524 {
1525 purple_notify_error(gc, NULL, _("Connection problem"), _("Unable to fetch room list.")); 1525 purple_notify_error(gc, NULL, _("Connection problem"), _("Unable to fetch room list."));
1526 yahoo_roomlist_cleanup(rl, yrl); 1526 yahoo_roomlist_cleanup(rl, yrl);
1527 return NULL; 1527 return NULL;
1586 g_free(url); 1586 g_free(url);
1587 1587
1588 yrl->ucat = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_CATEGORY, _("User Rooms"), yrl->cat); 1588 yrl->ucat = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_CATEGORY, _("User Rooms"), yrl->cat);
1589 purple_roomlist_room_add(list, yrl->ucat); 1589 purple_roomlist_room_add(list, yrl->ucat);
1590 1590
1591 if (purple_proxy_connect(NULL, list->account, yrl->host, 80, 1591 if (purple_proxy_connect(purple_account_get_connection(list->account),
1592 yahoo_roomlist_got_connected, yrl) == NULL) 1592 list->account, yrl->host, 80,
1593 yahoo_roomlist_got_connected, yrl) == NULL)
1593 { 1594 {
1594 purple_notify_error(purple_account_get_connection(list->account), 1595 purple_notify_error(purple_account_get_connection(list->account),
1595 NULL, _("Connection problem"), _("Unable to fetch room list.")); 1596 NULL, _("Connection problem"), _("Unable to fetch room list."));
1596 purple_roomlist_ref(list); 1597 purple_roomlist_ref(list);
1597 yahoo_roomlist_cleanup(list, yrl); 1598 yahoo_roomlist_cleanup(list, yrl);