diff src/account.c @ 6695:0c5637b5462e

[gaim-migrate @ 7221] This is contact support. Really. It has a few bugs left in it, like sorting not working, and stuff like that, but it's pretty solid for the most part. I'm not in the mood to do a whole lot of typing, so just use and enjoy. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 02 Sep 2003 03:41:10 +0000
parents 42fdf16f1dad
children dece74f05509
line wrap: on
line diff
--- a/src/account.c	Tue Sep 02 03:34:37 2003 +0000
+++ b/src/account.c	Tue Sep 02 03:41:10 2003 +0000
@@ -1300,7 +1300,7 @@
 void
 gaim_accounts_delete(GaimAccount *account)
 {
-	GaimBlistNode *gnode, *bnode;
+	GaimBlistNode *gnode, *cnode, *bnode;
 
 	g_return_if_fail(account != NULL);
 
@@ -1309,16 +1309,18 @@
 	for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) {
 		if (!GAIM_BLIST_NODE_IS_GROUP(gnode))
 			continue;
-
-		for (bnode = gnode->child; bnode != NULL; bnode = bnode->next) {
-			if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
-				struct buddy *b = (struct buddy *)bnode;
+		for (cnode = gnode->child; cnode; cnode = cnode->next) {
+			if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) {
+				for (bnode = cnode->child; bnode; bnode = bnode->next) {
+					if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) {
+						GaimBuddy *b = (GaimBuddy *)bnode;
 
-				if (b->account == account)
-					gaim_blist_remove_buddy(b);
-			}
-			else if (GAIM_BLIST_NODE_IS_CHAT(bnode)) {
-				struct chat *c = (struct chat *)bnode;
+						if (b->account == account)
+							gaim_blist_remove_buddy(b);
+					}
+				}
+			} else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) {
+				GaimBlistChat *c = (GaimBlistChat *)cnode;
 
 				if (c->account == account)
 					gaim_blist_remove_chat(c);