diff src/protocols/silc/buddy.c @ 9285:7a8aa87164ae

[gaim-migrate @ 10088] Ok I'm done. This started out as shx's patch to make add/remove buddy/buddies take GaimBuddy and GaimGroup's in various places. I think his diff was like 2000 lines and mine is like 5000. I tried to clean up blist.c a bit and make it more uniform. There are some more g_return_if_fail() checks. Removed some code that was deprecated--it's probably been long enough. Removed some #include <multi.h>'s. Make blist.xml saving happen on a timer, like prefs.xml and accounts.xml. Sorry if this doesn't merge cleanly with whatever you're doing. People should really test this a lot. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 15 Jun 2004 02:37:27 +0000
parents ac4480944fc3
children ab845c8e2afe
line wrap: on
line diff
--- a/src/protocols/silc/buddy.c	Tue Jun 15 01:17:16 2004 +0000
+++ b/src/protocols/silc/buddy.c	Tue Jun 15 02:37:27 2004 +0000
@@ -1322,41 +1322,15 @@
 	silc_buffer_free(attrs);
 }
 
-void silcgaim_add_buddy(GaimConnection *gc, const char *name, GaimGroup *grp)
+void silcgaim_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)
 {
-	GaimBuddy *b;
-
-	b = gaim_find_buddy_in_group(gc->account, name, grp);
-	if (!b)
-	  return;
-
-	silcgaim_add_buddy_i(gc, b, FALSE);
+	silcgaim_add_buddy_i(gc, buddy, FALSE);
 }
 
-void silcgaim_add_buddies(GaimConnection *gc, GList *buddies)
+void silcgaim_remove_buddy(GaimConnection *gc, GaimBuddy *buddy,
+			   GaimGroup *group)
 {
-	while (buddies) {
-		GaimBuddy *b;
-		b = gaim_find_buddy(gc->account, buddies->data);
-		if (!b)
-			continue;
-		silcgaim_add_buddy_i(gc, b, TRUE);
-		buddies = buddies->next;
-	}
-}
-
-void silcgaim_remove_buddy(GaimConnection *gc, const char *name,
-			   const char *group)
-{
-	GaimBuddy *b;
-	GaimGroup *g;
-
-	g = gaim_find_group(group);
-	b = gaim_find_buddy_in_group(gc->account, name, g);
-	if (!b)
-		return;
-
-	silc_free(b->proto_data);
+	silc_free(buddy->proto_data);
 }
 
 void silcgaim_idle_set(GaimConnection *gc, int idle)