| 743 { |
743 { |
| 744 struct yahoo_data *yd = gc->proto_data; |
744 struct yahoo_data *yd = gc->proto_data; |
| 745 struct yahoo_packet *pkt; |
745 struct yahoo_packet *pkt; |
| 746 GaimConversation *c; |
746 GaimConversation *c; |
| 747 |
747 |
| 748 #if 0 |
|
| 749 /* Bleeter, 12th Jan 2006: |
|
| 750 * After comparing to native YIM6, it would appear all we need to do is send the |
|
| 751 * YAHOO_SERVICE_CHATLOGOUT, because the YAHOO_SERVICE_CHATEXIT is the response |
|
| 752 * from the server. Leaving this in causes double room-left messages to be generated. |
|
| 753 */ |
|
| 754 char *eroom; |
748 char *eroom; |
| 755 gboolean utf8 = 1; |
749 gboolean utf8 = 1; |
| 756 #endif |
|
| 757 |
750 |
| 758 if (yd->wm) { |
751 if (yd->wm) { |
| 759 g_return_if_fail(yd->ycht != NULL); |
752 g_return_if_fail(yd->ycht != NULL); |
| 760 |
753 |
| 761 ycht_chat_leave(yd->ycht, room, logout); |
754 ycht_chat_leave(yd->ycht, room, logout); |
| 762 return; |
755 return; |
| 763 } |
756 } |
| 764 |
757 |
| 765 #if 0 |
|
| 766 eroom = yahoo_string_encode(gc, room, &utf8); |
758 eroom = yahoo_string_encode(gc, room, &utf8); |
| 767 |
759 |
| 768 pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); |
760 pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); |
| 769 yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); |
761 yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); |
| 770 yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ |
762 yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ |
| 771 yahoo_packet_send_and_free(pkt, yd); |
763 yahoo_packet_send_and_free(pkt, yd); |
| 772 #endif |
|
| 773 |
764 |
| 774 yd->in_chat = 0; |
765 yd->in_chat = 0; |
| 775 if (yd->chat_name) { |
766 if (yd->chat_name) { |
| 776 g_free(yd->chat_name); |
767 g_free(yd->chat_name); |
| 777 yd->chat_name = NULL; |
768 yd->chat_name = NULL; |
| 787 YAHOO_STATUS_AVAILABLE, 0); |
778 YAHOO_STATUS_AVAILABLE, 0); |
| 788 yahoo_packet_hash_str(pkt, 1, dn); |
779 yahoo_packet_hash_str(pkt, 1, dn); |
| 789 yahoo_packet_send_and_free(pkt, yd); |
780 yahoo_packet_send_and_free(pkt, yd); |
| 790 |
781 |
| 791 yd->chat_online = 0; |
782 yd->chat_online = 0; |
| 792 #if 0 |
|
| 793 g_free(eroom); |
783 g_free(eroom); |
| 794 #endif |
|
| 795 } |
784 } |
| 796 |
785 |
| 797 /* borrowed from gtkconv.c */ |
786 /* borrowed from gtkconv.c */ |
| 798 static gboolean |
787 static gboolean |
| 799 meify(char *message, size_t len) |
788 meify(char *message, size_t len) |