diff src/protocols/trepia/trepia.c @ 5855:082982a4acbd

[gaim-migrate @ 6286] ok, this will get rid of the negative group counts for trepia, and also fixes the accounts dialog so signing off of an account leaves it signed off committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 13 Jun 2003 17:55:02 +0000
parents 97d1ad7a50cc
children 98ec3e394f59
line wrap: on
line diff
--- a/src/protocols/trepia/trepia.c	Fri Jun 13 16:49:00 2003 +0000
+++ b/src/protocols/trepia/trepia.c	Fri Jun 13 17:55:02 2003 +0000
@@ -156,9 +156,20 @@
 static void
 __clear_user_list(TrepiaSession *session)
 {
-	gaim_debug(GAIM_DEBUG_INFO, "trepia", "Clearing user list\n");
-	g_hash_table_foreach(session->user_profiles, _remove_user_fnc, session);
-	gaim_debug(GAIM_DEBUG_INFO, "trepia", "Done clearing user list\n");
+	GaimBlistNode *gnode, *bnode;
+	for(gnode = gaim_get_blist()->root; gnode; gnode = gnode->next) {
+		bnode = gnode->child;
+		while(bnode) {
+			struct buddy *buddy = (struct buddy *)bnode;
+			if(GAIM_BLIST_NODE_IS_BUDDY(bnode) &&
+					buddy->account == session->gc->account) {
+				bnode = bnode->next;
+				gaim_blist_remove_buddy(buddy);
+			} else {
+				bnode = bnode->next;
+			}
+		}
+	}
 }
 
 #if 0
@@ -1063,8 +1074,6 @@
 {
 	TrepiaSession *session = gc->proto_data;
 
-	__clear_user_list(session);
-
 	if (session->rxqueue != NULL)
 		g_string_free(session->rxqueue, TRUE);