# HG changeset patch # User Richard Laager # Date 1137190843 0 # Node ID 27c4145c6daa68beef58f1002fce68acc5ab1ec7 # Parent 2c0f8815aa2e36aa18846b696037b4160fc3ad2d [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 diff -r 2c0f8815aa2e -r 27c4145c6daa src/protocols/yahoo/yahoochat.c --- a/src/protocols/yahoo/yahoochat.c Fri Jan 13 22:08:30 2006 +0000 +++ b/src/protocols/yahoo/yahoochat.c Fri Jan 13 22:20:43 2006 +0000 @@ -726,8 +726,16 @@ struct yahoo_data *yd = gc->proto_data; struct yahoo_packet *pkt; GaimConversation *c; + +#if 0 +/* Bleeter, 12th Jan 2006: + * After comparing to native YIM6, it would appear all we need to do is send the + * YAHOO_SERVICE_CHATLOGOUT, because the YAHOO_SERVICE_CHATEXIT is the response + * from the server. Leaving this in causes double room-left messages to be generated. + */ char *eroom; gboolean utf8 = 1; +#endif if (yd->wm) { g_return_if_fail(yd->ycht != NULL); @@ -736,12 +744,14 @@ return; } +#if 0 eroom = yahoo_string_encode(gc, room, &utf8); pkt = yahoo_packet_new(YAHOO_SERVICE_CHATEXIT, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash(pkt, "sss", 104, eroom, 109, dn, 108, "1"); yahoo_packet_hash_str(pkt, 112, "0"); /* what does this one mean? */ yahoo_packet_send_and_free(pkt, yd); +#endif yd->in_chat = 0; if (yd->chat_name) { @@ -761,7 +771,9 @@ yahoo_packet_send_and_free(pkt, yd); yd->chat_online = 0; +#if 0 g_free(eroom); +#endif } /* borrowed from gtkconv.c */