changeset 9782:68368058ee03

[gaim-migrate @ 10650] This was harder than I thought. Adding the debug line seemed to make it start working. Hmm. This just sends the leave packet for all conferences you're in when you sign off on Yahoo!. Otherwise we think you're still in the conference. And apparently so does Yahoo!. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Thu, 19 Aug 2004 05:38:57 +0000
parents 3cd8143b84b8
children d0789df08651
files ChangeLog src/protocols/yahoo/yahoo.c src/protocols/yahoo/yahoochat.c src/protocols/yahoo/yahoochat.h
diffstat 4 files changed, 16 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 19 04:18:35 2004 +0000
+++ b/ChangeLog	Thu Aug 19 05:38:57 2004 +0000
@@ -23,6 +23,7 @@
 	  using multiple monitors (Dave West)
 	* Better parsing of URLs containing special characters
 	* All users are shown when joining a Yahoo! conference (Bleeter Yaluser)
+	* You now leave all Yahoo! conferences when you log out of Yahoo!
 
 version 0.81 (08/05/2004):
 	New Features:
--- a/src/protocols/yahoo/yahoo.c	Thu Aug 19 04:18:35 2004 +0000
+++ b/src/protocols/yahoo/yahoo.c	Thu Aug 19 05:38:57 2004 +0000
@@ -2458,9 +2458,18 @@
 
 static void yahoo_close(GaimConnection *gc) {
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
+	GSList *l;
+
+	for (l = yd->confs; l; l = l->next) {
+		GaimConversation *conv = l->data;
+
+		yahoo_conf_leave(yd, gaim_conversation_get_name(conv),
+		                 gaim_connection_get_display_name(gc),
+				 gaim_conv_chat_get_users(GAIM_CONV_CHAT(conv)));
+	}
+	g_slist_free(yd->confs);
 
 	g_hash_table_destroy(yd->friends);
-	g_slist_free(yd->confs);
 	if (yd->chat_name)
 		g_free(yd->chat_name);
 
--- a/src/protocols/yahoo/yahoochat.c	Thu Aug 19 04:18:35 2004 +0000
+++ b/src/protocols/yahoo/yahoochat.c	Thu Aug 19 05:38:57 2004 +0000
@@ -586,12 +586,13 @@
  * I think conference names are always ascii.
  */
 
-static void yahoo_conf_leave(struct yahoo_data *yd, const char *room, const char *dn, GList *who)
+void yahoo_conf_leave(struct yahoo_data *yd, const char *room, const char *dn, GList *who)
 {
 	struct yahoo_packet *pkt;
 	GList *w;
 
-
+	gaim_debug_misc("yahoo", "leaving conference %s\n", room);
+	
 	pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGOFF, YAHOO_STATUS_AVAILABLE, 0);
 
 	yahoo_packet_hash(pkt, 1, dn);
--- a/src/protocols/yahoo/yahoochat.h	Thu Aug 19 04:18:35 2004 +0000
+++ b/src/protocols/yahoo/yahoochat.h	Thu Aug 19 05:38:57 2004 +0000
@@ -48,6 +48,8 @@
 void yahoo_c_join(GaimConnection *gc, GHashTable *data);
 void yahoo_c_invite(GaimConnection *gc, int id, const char *msg, const char *name);
 
+void yahoo_conf_leave(struct yahoo_data *yd, const char *room, const char *dn, GList *who);
+
 void yahoo_chat_goto(GaimConnection *gc, const char *name);
 
 /* room listing functions */