Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoochat.c @ 12865:27c4145c6daa
[gaim-migrate @ 15216]
A patch from Bleeter...
"One thing that's always itched me about gaim, and adium for that matter,
and a number of other clients (although, seems less now), is that when
you leave a yahoo chatroom, it results in the yahoo servers sending out
two 'user has left room' messages.
"it would seem
it's the server that sends us the CHAT_EXIT, not the other way round."
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 13 Jan 2006 22:20:43 +0000 |
parents | 4d3119205a33 |
children | a2096c8978b2 |
comparison
equal
deleted
inserted
replaced
12864:2c0f8815aa2e | 12865:27c4145c6daa |
---|---|
724 static void yahoo_chat_leave(GaimConnection *gc, const char *room, const char *dn, gboolean logout) | 724 static void yahoo_chat_leave(GaimConnection *gc, const char *room, const char *dn, gboolean logout) |
725 { | 725 { |
726 struct yahoo_data *yd = gc->proto_data; | 726 struct yahoo_data *yd = gc->proto_data; |
727 struct yahoo_packet *pkt; | 727 struct yahoo_packet *pkt; |
728 GaimConversation *c; | 728 GaimConversation *c; |
729 | |
730 #if 0 | |
731 /* Bleeter, 12th Jan 2006: | |
732 * After comparing to native YIM6, it would appear all we need to do is send the | |
733 * YAHOO_SERVICE_CHATLOGOUT, because the YAHOO_SERVICE_CHATEXIT is the response | |
734 * from the server. Leaving this in causes double room-left messages to be generated. | |
735 */ | |
729 char *eroom; | 736 char *eroom; |
730 gboolean utf8 = 1; | 737 gboolean utf8 = 1; |
738 #endif | |
731 | 739 |
732 if (yd->wm) { | 740 if (yd->wm) { |
733 g_return_if_fail(yd->ycht != NULL); | 741 g_return_if_fail(yd->ycht != NULL); |
734 | 742 |
735 ycht_chat_leave(yd->ycht, room, logout); | 743 ycht_chat_leave(yd->ycht, room, logout); |
736 return; | 744 return; |
737 } | 745 } |
738 | 746 |
747 #if 0 | |
739 eroom = yahoo_string_encode(gc, room, &utf8); | 748 eroom = yahoo_string_encode(gc, room, &utf8); |
740 | 749 |
741 pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); | 750 pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); |
742 yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); | 751 yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); |
743 yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ | 752 yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ |
744 yahoo_packet_send_and_free(pkt, yd); | 753 yahoo_packet_send_and_free(pkt, yd); |
754 #endif | |
745 | 755 |
746 yd->in_chat = 0; | 756 yd->in_chat = 0; |
747 if (yd->chat_name) { | 757 if (yd->chat_name) { |
748 g_free(yd->chat_name); | 758 g_free(yd->chat_name); |
749 yd->chat_name = NULL; | 759 yd->chat_name = NULL; |
759 YAHOO_STATUS_AVAILABLE, 0); | 769 YAHOO_STATUS_AVAILABLE, 0); |
760 yahoo_packet_hash_str(pkt, 1, dn); | 770 yahoo_packet_hash_str(pkt, 1, dn); |
761 yahoo_packet_send_and_free(pkt, yd); | 771 yahoo_packet_send_and_free(pkt, yd); |
762 | 772 |
763 yd->chat_online = 0; | 773 yd->chat_online = 0; |
774 #if 0 | |
764 g_free(eroom); | 775 g_free(eroom); |
776 #endif | |
765 } | 777 } |
766 | 778 |
767 /* borrowed from gtkconv.c */ | 779 /* borrowed from gtkconv.c */ |
768 static gboolean | 780 static gboolean |
769 meify(char *message, size_t len) | 781 meify(char *message, size_t len) |