diff src/server.c @ 368:9bf1f77985d2

[gaim-migrate @ 378] chat works properly now. it wasn't even working properly on the toc side, but the toc server was more lenient. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 09 Jun 2000 07:59:00 +0000
parents b402a23f35df
children be408b41c172
line wrap: on
line diff
--- a/src/server.c	Thu Jun 08 07:04:58 2000 +0000
+++ b/src/server.c	Fri Jun 09 07:59:00 2000 +0000
@@ -548,8 +548,10 @@
 	GList *bcs = buddy_chats;
 	struct buddy_chat *b = NULL;
 	struct chat_connection *c = NULL;
+	int count = 0;
 
 	while (bcs) {
+		count++;
 		b = (struct buddy_chat *)bcs->data;
 		if (id == b->id)
 			break;
@@ -560,6 +562,10 @@
 	if (!b)
 		return;
 
+	sprintf(debug_buff, "Attempting to leave room %s (currently in %d rooms)\n",
+				b->name, count);
+	debug_print(debug_buff);
+
 	aim_chat_leaveroom(gaim_sess, b->name);
 	c = find_oscar_chat(b->name);
 	if (c != NULL) {
@@ -568,6 +574,8 @@
 		g_free(c->name);
 		g_free(c);
 	}
+	/* we do this because with Oscar it doesn't tell us we left */
+	serv_got_chat_left(b->id);
 #endif
 }
 
@@ -950,8 +958,8 @@
         if (!b)
                 return;
 
-        if (b->window)
-                gtk_widget_destroy(GTK_WIDGET(b->window));
+	sprintf(debug_buff, "Leaving room %s.\n", b->name);
+	debug_print(debug_buff);
 
         buddy_chats = g_list_remove(buddy_chats, b);