# HG changeset patch # User Tim Ringenbach # Date 1092893937 0 # Node ID 68368058ee035a645ca347f7c0153a3e83d6f349 # Parent 3cd8143b84b8fa3c5e6fdb30b69f716a4ab2868e [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 diff -r 3cd8143b84b8 -r 68368058ee03 ChangeLog --- 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: diff -r 3cd8143b84b8 -r 68368058ee03 src/protocols/yahoo/yahoo.c --- 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); diff -r 3cd8143b84b8 -r 68368058ee03 src/protocols/yahoo/yahoochat.c --- 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); diff -r 3cd8143b84b8 -r 68368058ee03 src/protocols/yahoo/yahoochat.h --- 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 */