changeset 11643:eb14bbcf7249

[gaim-migrate @ 13920] sf patch #1293063, from John Bailey Move and rename some functions from server.c to the account API. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 12 Oct 2005 02:47:31 +0000
parents 58bc500cf226
children f4e58e94ced3
files plugins/ChangeLog.API plugins/gevolution/gevo-util.c plugins/perl/common/Account.xs plugins/perl/common/Server.xs src/account.c src/account.h src/blist.c src/gtkblist.c src/gtkdialogs.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c src/protocols/yahoo/yahoo.c src/server.c src/server.h
diffstat 14 files changed, 277 insertions(+), 201 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/ChangeLog.API	Wed Oct 12 02:27:32 2005 +0000
+++ b/plugins/ChangeLog.API	Wed Oct 12 02:47:31 2005 +0000
@@ -104,6 +104,19 @@
 	           and secondary args
 	* Removed: uc from the GaimBuddy struct
 	* Removed: gaim_sound_get_handle()
+	* Removed: gaim_debug_vargs()
+	* Added:   gaim_account_add_buddy()
+	* Added:   gaim_account_add_buddies()
+	* Added:   gaim_account_remove_buddy()
+	* Added:   gaim_account_remove_buddies()
+	* Added:   gaim_account_change_password()
+	* Removed: serv_add_buddy(); use gaim_account_add_buddy() instead
+	* Removed: serv_add_buddies(); use gaim_account_add_buddies() instead
+	* Removed: serv_remove_buddy(); use gaim_account_remove_buddy() instead
+	* Removed: serv_remove_buddies(); use gaim_account_remove_buddies()
+	           instead
+	* Removed: serv_change_passwd(); use gaim_account_change_password()
+	           instead
 
 	Signals:
 	* Changed: "received-im-msg" and "received-chat-msg" to match, both
@@ -129,7 +142,6 @@
 	* Added:   "buddy-added" and "buddy-removed", which are self-explanatory
 	* Added:   "blist-node-aliased", an alias was set for a buddy, chat or
 	           contact.  See the Doxygen documentation for the details.
-	* Removed: gaim_debug_vargs()
 
 version 1.0.0 (09/17/2004):
 	* Added: get_chat_name to the GaimPluginProtocolInfo struct
--- a/plugins/gevolution/gevo-util.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/plugins/gevolution/gevo-util.c	Wed Oct 12 02:47:31 2005 +0000
@@ -43,7 +43,7 @@
 
 	buddy = gaim_buddy_new(account, screenname, alias);
 	gaim_blist_add_buddy(buddy, NULL, group, NULL);
-	serv_add_buddy(gaim_account_get_connection(account), buddy);
+	gaim_account_add_buddy(account, buddy);
 
 	if (conv != NULL)
 	{
--- a/plugins/perl/common/Account.xs	Wed Oct 12 02:27:32 2005 +0000
+++ b/plugins/perl/common/Account.xs	Wed Oct 12 02:47:31 2005 +0000
@@ -188,6 +188,71 @@
 gaim_account_destroy_log(account)
 	Gaim::Account account
 
+void 
+gaim_account_add_buddies(account, list)
+	Gaim::Account account
+	SV * list
+PREINIT:
+	GList *t_GL;
+	int i, t_len;
+PPCODE:
+	t_GL = NULL;
+	t_len = av_len((AV *)SvRV(list));
+
+	for (i = 0; i < t_len; i++) {
+		STRLEN t_sl;
+		t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(list), i, 0), t_sl));
+	}
+	gaim_account_add_buddies(account, t_GL);
+	
+void 
+gaim_account_add_buddy(account, buddy)
+	Gaim::Account account
+	Gaim::BuddyList::Buddy	buddy
+
+void 
+gaim_account_change_password(account, a, b)
+	Gaim::Account account
+	const char *	a
+	const char *	b
+
+void 
+gaim_account_remove_buddies(account, A, B)
+	Gaim::Account account
+	SV * A
+	SV * B
+PREINIT:
+	GList *t_GL1, *t_GL2;
+	int i, t_len;
+PPCODE:
+	t_GL1 = NULL;
+	t_len = av_len((AV *)SvRV(A));
+
+	for (i = 0; i < t_len; i++) {
+		STRLEN t_sl;
+		t_GL1 = g_list_append(t_GL1, SvPV(*av_fetch((AV *)SvRV(A), i, 0), t_sl));
+	}
+	
+	t_GL2 = NULL;
+	t_len = av_len((AV *)SvRV(B));
+
+	for (i = 0; i < t_len; i++) {
+		STRLEN t_sl;
+		t_GL2 = g_list_append(t_GL2, SvPV(*av_fetch((AV *)SvRV(B), i, 0), t_sl));
+	}
+	gaim_account_remove_buddies(account, t_GL1, t_GL2);
+
+void 
+gaim_account_remove_buddy(account, buddy, group)
+	Gaim::Account account
+	Gaim::BuddyList::Buddy buddy
+	Gaim::BuddyList::Group group
+
+void 
+gaim_account_remove_group(account, group)
+	Gaim::Account account
+	Gaim::BuddyList::Group group
+
 
 
 
--- a/plugins/perl/common/Server.xs	Wed Oct 12 02:27:32 2005 +0000
+++ b/plugins/perl/common/Server.xs	Wed Oct 12 02:47:31 2005 +0000
@@ -5,28 +5,6 @@
 
 
 void 
-serv_add_buddies(con, list)
-	Gaim::Connection con
-	SV * list
-PREINIT:
-	GList *t_GL;
-	int i, t_len;
-PPCODE:
-	t_GL = NULL;
-	t_len = av_len((AV *)SvRV(list));
-
-	for (i = 0; i < t_len; i++) {
-		STRLEN t_sl;
-		t_GL = g_list_append(t_GL, SvPV(*av_fetch((AV *)SvRV(list), i, 0), t_sl));
-	}
-	serv_add_buddies(con, t_GL);
-	
-void 
-serv_add_buddy(con, buddy)
-	Gaim::Connection 	con
-	Gaim::BuddyList::Buddy	buddy 
-
-void 
 serv_add_deny(con, a)
 	Gaim::Connection con
 	const char * a
@@ -41,12 +19,6 @@
 	Gaim::BuddyList::Buddy buddy 
 
 void 
-serv_change_passwd(con, a, b)
-	Gaim::Connection con
-	const char *	a
-	const char *	b
-
-void 
 serv_chat_invite(con, a, b, c)
 	Gaim::Connection con
 	int a
@@ -211,44 +183,7 @@
 void 
 serv_rem_permit(con, a)
 	Gaim::Connection con
-	const char * 	a
-
-void 
-serv_remove_buddies(con, A, B)
-	Gaim::Connection con
-	SV * A
-	SV * B
-PREINIT:
-	GList *t_GL1, *t_GL2;
-	int i, t_len;
-PPCODE:
-	t_GL1 = NULL;
-	t_len = av_len((AV *)SvRV(A));
-
-	for (i = 0; i < t_len; i++) {
-		STRLEN t_sl;
-		t_GL1 = g_list_append(t_GL1, SvPV(*av_fetch((AV *)SvRV(A), i, 0), t_sl));
-	}
-	
-	t_GL2 = NULL;
-	t_len = av_len((AV *)SvRV(B));
-
-	for (i = 0; i < t_len; i++) {
-		STRLEN t_sl;
-		t_GL2 = g_list_append(t_GL2, SvPV(*av_fetch((AV *)SvRV(B), i, 0), t_sl));
-	}
-	serv_remove_buddies(con, t_GL1, t_GL2);
-
-void 
-serv_remove_buddy(con, buddy, group)
-	Gaim::Connection con
-	Gaim::BuddyList::Buddy buddy
-	Gaim::BuddyList::Group group
-
-void 
-serv_remove_group(con, group)
-	Gaim::Connection con
-	Gaim::BuddyList::Group group 
+	const char *	a
 
 void 
 serv_send_file(gc, who, file)
--- a/src/account.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/account.c	Wed Oct 12 02:47:31 2005 +0000
@@ -1059,8 +1059,7 @@
 		return;
 	}
 
-	serv_change_passwd(gaim_account_get_connection(account),
-					   orig_pass, new_pass_1);
+	gaim_account_change_password(account, orig_pass, new_pass_1);
 	gaim_account_set_password(account, new_pass_1);
 }
 
@@ -1898,6 +1897,122 @@
 }
 
 void
+gaim_account_add_buddy(GaimAccount *account, GaimBuddy *buddy)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info != NULL && g_list_find(gaim_connections_get_all(), gc) &&
+			prpl_info->add_buddy != NULL)
+		prpl_info->add_buddy(gc, buddy, gaim_find_buddys_group(buddy));
+}
+
+void
+gaim_account_add_buddies(GaimAccount *account, GList *buddies)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) {
+		GList *cur, *groups = NULL;
+
+		/* Make a list of what group each buddy is in */
+		for (cur = buddies; cur != NULL; cur = cur->next) {
+			GaimBlistNode *node = cur->data;
+			groups = g_list_append(groups, node->parent->parent);
+		}
+
+		if (prpl_info->add_buddies != NULL)
+			prpl_info->add_buddies(gc, buddies, groups);
+		else if (prpl_info->add_buddy != NULL) {
+			GList *curb = buddies, *curg = groups;
+
+			while ((curb != NULL) && (curg != NULL)) {
+				prpl_info->add_buddy(gc, curb->data, curg->data);
+				curb = curb->next;
+				curg = curg->next;
+			}
+		}
+
+		g_list_free(groups);
+	}
+}
+
+void
+gaim_account_remove_buddy(GaimAccount *account, GaimBuddy *buddy,
+		GaimGroup *group)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->remove_buddy)
+		prpl_info->remove_buddy(gc, buddy, group);
+}
+
+void
+gaim_account_remove_buddies(GaimAccount *account, GList *buddies, GList *groups)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (!g_list_find(gaim_connections_get_all(), gc))
+		return;
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) {
+		if (prpl_info->remove_buddies)
+			prpl_info->remove_buddies(gc, buddies, groups);
+		else {
+			GList *curb = buddies;
+			GList *curg = groups;
+			while ((curb != NULL) && (curg != NULL)) {
+				gaim_account_remove_buddy(account, curb->data, curg->data);
+				curb = curb->next;
+				curg = curg->next;
+			}
+		}
+	}
+}
+
+void
+gaim_account_remove_group(GaimAccount *account, GaimGroup *group)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->remove_group)
+		prpl_info->remove_group(gc, group);
+}
+
+void
+gaim_account_change_password(GaimAccount *account, const char *orig_pw,
+		const char *new_pw)
+{
+	GaimPluginProtocolInfo *prpl_info = NULL;
+	GaimConnection *gc = gaim_account_get_connection(account);
+
+	if (gc != NULL && gc->prpl != NULL)
+		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
+
+	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->change_passwd)
+		prpl_info->change_passwd(gc, orig_pw, new_pw);
+}	
+
+void
 gaim_accounts_add(GaimAccount *account)
 {
 	g_return_if_fail(account != NULL);
--- a/src/account.h	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/account.h	Wed Oct 12 02:47:31 2005 +0000
@@ -682,6 +682,63 @@
  */
 void gaim_account_destroy_log(GaimAccount *account);
 
+/**
+ * Adds a buddy to the server-side buddy list for the specified account.
+ *
+ * @param account The account.
+ * @param buddy The buddy to add.
+ */
+void gaim_account_add_buddy(GaimAccount *account, GaimBuddy *buddy);
+/**
+ * Adds a list of buddies to the server-side buddy list.
+ *
+ * @param account The account.
+ * @param buddies The list of GaimBlistNodes representing the buddies to add.
+ */
+void gaim_account_add_buddies(GaimAccount *account, GList *buddies);
+
+/**
+ * Removes a buddy from the server-side buddy list.
+ *
+ * @param account The account.
+ * @param buddy The buddy to remove.
+ * @pararm group The group to remove the buddy from.
+ */
+void gaim_account_remove_buddy(GaimAccount *account, GaimBuddy *buddy,
+								GaimGroup *group);
+
+/**
+ * Removes a list of buddies from the server-side buddy list.
+ *
+ * @note The lists buddies and groups are parallel lists.  Be sure that node n of
+ *       groups matches node n of buddies.
+ *
+ * @param account The account.
+ * @param buddies The list of buddies to remove.
+ * @param groups The list of groups to remove buddies from.  Each node of this
+ *               list should match the corresponding node of buddies.
+ */
+void gaim_account_remove_buddies(GaimAccount *account, GList *buddies,
+									GList *groups);
+
+/**
+ * Removes a group from the server-side buddy list.
+ *
+ * @param account The account.
+ * @param group The group to remove.
+ */
+void gaim_account_remove_group(GaimAccount *account, GaimGroup *group);
+
+/**
+ * Changes the password on the specified account.
+ *
+ * @param account The account.
+ * @param orig_pw The old password.
+ * @param new_pw The new password.
+ */
+void gaim_account_change_password(GaimAccount *account, const char *orig_pw,
+									const char *new_pw);
+
 /*@}*/
 
 /**************************************************************************/
--- a/src/blist.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/blist.c	Wed Oct 12 02:47:31 2005 +0000
@@ -1039,9 +1039,9 @@
 					groups = g_list_append(groups, node->parent->parent);
 				}
 
-				serv_remove_buddies(account->gc, buddies, groups);
+				gaim_account_remove_buddies(account, buddies, groups);
 				g_list_free(groups);
-				serv_add_buddies(account->gc, buddies);
+				gaim_account_add_buddies(account, buddies);
 			}
 
 			g_list_free(buddies);
@@ -1520,7 +1520,7 @@
 					g_free(hb->name);
 					g_free(hb);
 					if (b->account->gc)
-						serv_remove_buddy(b->account->gc, b, (GaimGroup *)cnode->parent);
+						gaim_account_remove_buddy(b->account, b, (GaimGroup *)cnode->parent);
 
 					if (!cnode->child->next)
 						empty_contact = TRUE;
@@ -1894,7 +1894,7 @@
 		GaimConnection *gc = (GaimConnection *)l->data;
 
 		if (gaim_connection_get_state(gc) == GAIM_CONNECTED)
-			serv_remove_group(gc, group);
+			gaim_account_remove_group(gaim_connection_get_account(gc), group);
 	}
 
 	/* Delete the node */
--- a/src/gtkblist.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/gtkblist.c	Wed Oct 12 02:47:31 2005 +0000
@@ -4276,19 +4276,21 @@
 
 		b = gaim_buddy_new(data->account, who, whoalias);
 		gaim_blist_add_buddy(b, NULL, g, NULL);
-		serv_add_buddy(gaim_account_get_connection(data->account), b);
+		gaim_account_add_buddy(data->account, b);
 
 		/*
 		 * XXX
-		 * It really seems like it would be better if the call to serv_add_buddy()
-		 * and gaim_conversation_update() were done in blist.c, possibly in the
-		 * gaim_blist_add_buddy() function.  Maybe serv_add_buddy() should be
-		 * renamed to gaim_blist_add_new_buddy() or something, and have it call
+		 * It really seems like it would be better if the call to
+		 * gaim_account_add_buddy() and gaim_conversation_update() were done in
+		 * blist.c, possibly in the gaim_blist_add_buddy() function.  Maybe
+		 * gaim_account_add_buddy() should be renamed to
+		 * gaim_blist_add_new_buddy() or something, and have it call
 		 * gaim_blist_add_buddy() after it creates it.  --Mark
 		 *
 		 * No that's not good.  blist.c should only deal with adding nodes to the
-		 * local list.  We need a new, non-gtk file that calls both serv_add_buddy
-		 * and gaim_blist_add_buddy().  Or something.  --Mark
+		 * local list.  We need a new, non-gtk file that calls both
+		 * gaim_account_add_buddy and gaim_blist_add_buddy().
+		 * Or something.  --Mark
 		 */
 
 		c = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, who, data->account);
--- a/src/gtkdialogs.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/gtkdialogs.c	Wed Oct 12 02:47:31 2005 +0000
@@ -776,7 +776,7 @@
 	for (bnode = cnode->child; bnode; bnode = bnode->next) {
 		GaimBuddy *buddy = (GaimBuddy*)bnode;
 		if (gaim_account_is_connected(buddy->account))
-			serv_remove_buddy(buddy->account->gc, buddy, group);
+			gaim_account_remove_buddy(buddy->account, buddy, group);
 	}
 	gaim_blist_remove_contact(contact);
 }
@@ -833,7 +833,7 @@
 															   buddy->name,
 															   buddy->account);
 					if (gaim_account_is_connected(buddy->account)) {
-						serv_remove_buddy(buddy->account->gc, buddy, group);
+						gaim_account_remove_buddy(buddy->account, buddy, group);
 						gaim_blist_remove_buddy(buddy);
 						if (conv)
 							gaim_conversation_update(conv,
@@ -887,8 +887,8 @@
 	account = buddy->account;
 
 	gaim_debug_info("blist", "Removing '%s' from buddy list.\n", buddy->name);
-	/* TODO - Should remove from blist first... then call serv_remove_buddy()? */
-	serv_remove_buddy(buddy->account->gc, buddy, group);
+	/* TODO - Should remove from blist first... then call gaim_account_remove_buddy()? */
+	gaim_account_remove_buddy(buddy->account, buddy, group);
 	gaim_blist_remove_buddy(buddy);
 
 	conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, name, account);
--- a/src/protocols/oscar/oscar.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/protocols/oscar/oscar.c	Wed Oct 12 02:47:31 2005 +0000
@@ -6754,6 +6754,7 @@
 	if (od->sess->ssi.received_data) {
 		if (aim_ssi_itemlist_finditem(od->sess->ssi.local, group->name, NULL, AIM_SSI_TYPE_GROUP)) {
 			GList *cur, *groups = NULL;
+			GaimAccount *account = gaim_connection_get_account(gc);
 
 			/* Make a list of what the groups each buddy is in */
 			for (cur = moved_buddies; cur != NULL; cur = cur->next) {
@@ -6764,8 +6765,8 @@
 						node->parent->parent);
 			}
 
-			serv_remove_buddies(gc, moved_buddies, groups);
-			serv_add_buddies(gc, moved_buddies);
+			gaim_account_remove_buddies(account, moved_buddies, groups);
+			gaim_account_add_buddies(account, moved_buddies);
 			g_list_free(groups);
 			gaim_debug_info("oscar",
 					   "ssi: moved all buddies from group %s to %s\n", old_name, group->name);
--- a/src/protocols/toc/toc.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/protocols/toc/toc.c	Wed Oct 12 02:47:31 2005 +0000
@@ -642,7 +642,7 @@
 
 	if (account->gc) {
 		if (buddies != NULL) {
-			serv_add_buddies(account->gc, buddies);
+			gaim_account_add_buddies(account, buddies);
 			g_list_free(buddies);
 		}
 		serv_set_permit_deny(account->gc);
@@ -741,7 +741,7 @@
 		buddy = gaim_buddy_new(account, username, NULL);
 		/* XXX - Pick a group to add to */
 		/* gaim_blist_add(buddy, NULL, g, NULL); */
-		serv_add_buddy(gc, buddy);
+		gaim_account_add_buddy(gc, buddy);
 
 		/* Client sends TOC toc_init_done message */
 		gaim_debug(GAIM_DEBUG_INFO, "toc",
--- a/src/protocols/yahoo/yahoo.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/protocols/yahoo/yahoo.c	Wed Oct 12 02:47:31 2005 +0000
@@ -1711,7 +1711,7 @@
 
 	gaim_debug(GAIM_DEBUG_INFO, "blist",
 		"Removing '%s' from buddy list.\n", buddy->name);
-	serv_remove_buddy(account->gc, buddy, group);
+	gaim_account_remove_buddy(account, buddy, group);
 	gaim_blist_remove_buddy(buddy);
 
 	serv_add_deny(account->gc, name);
--- a/src/server.c	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/server.c	Wed Oct 12 02:47:31 2005 +0000
@@ -209,111 +209,6 @@
 	}
 }
 
-void serv_change_passwd(GaimConnection *gc, const char *orig, const char *new)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->change_passwd)
-		prpl_info->change_passwd(gc, orig, new);
-}
-
-void serv_add_buddy(GaimConnection *gc, GaimBuddy *buddy)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->add_buddy)
-		prpl_info->add_buddy(gc, buddy, gaim_find_buddys_group(buddy));
-}
-
-void serv_add_buddies(GaimConnection *gc, GList *buddies)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) {
-		GList *cur, *groups = NULL;
-
-		/* Make a list of what the groups each buddy is in */
-		for (cur = buddies; cur != NULL; cur = cur->next) {
-			GaimBlistNode *node = cur->data;
-			groups = g_list_append(groups, node->parent->parent);
-		}
-
-		if (prpl_info->add_buddies)
-			prpl_info->add_buddies(gc, buddies, groups);
-		else if (prpl_info->add_buddy) {
-			GList *curb = buddies;
-			GList *curg = groups;
-			while ((curb != NULL) && (curg != NULL)) {
-				prpl_info->add_buddy(gc, curb->data, curg->data);
-				curb = curb->next;
-				curg = curg->next;
-			}
-		}
-
-		g_list_free(groups);
-	}
-}
-
-
-void serv_remove_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) && prpl_info->remove_buddy)
-		prpl_info->remove_buddy(gc, buddy, group);
-}
-
-void serv_remove_buddies(GaimConnection *gc, GList *buddies, GList *groups)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (!g_list_find(gaim_connections_get_all(), gc))
-		return;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc)) {
-		if (prpl_info->remove_buddies) {
-			prpl_info->remove_buddies(gc, buddies, groups);
-		} else {
-			GList *curb = buddies;
-			GList *curg = groups;
-			while ((curb != NULL) && (curg != NULL)) {
-				serv_remove_buddy(gc, curb->data, curg->data);
-				curb = curb->next;
-				curg = curg->next;
-			}
-		}
-	}
-}
-
-void serv_remove_group(GaimConnection *gc, GaimGroup *group)
-{
-	GaimPluginProtocolInfo *prpl_info = NULL;
-
-	if (gc != NULL && gc->prpl != NULL)
-		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
-
-	if (prpl_info && g_list_find(gaim_connections_get_all(), gc) &&
-		prpl_info->remove_group)
-	{
-		prpl_info->remove_group(gc, group);
-	}
-}
-
 /*
  * Set buddy's alias on server roster/list
  */
--- a/src/server.h	Wed Oct 12 02:27:32 2005 +0000
+++ b/src/server.h	Wed Oct 12 02:47:31 2005 +0000
@@ -39,12 +39,6 @@
 void serv_set_idle(GaimConnection *, int);
 void serv_set_info(GaimConnection *, const char *);
 int  serv_send_typing(GaimConnection *, const char *, int);
-void serv_change_passwd(GaimConnection *, const char *, const char *);
-void serv_add_buddy(GaimConnection *, GaimBuddy *);
-void serv_add_buddies(GaimConnection *, GList *);
-void serv_remove_buddy(GaimConnection *, GaimBuddy *, GaimGroup *);
-void serv_remove_buddies(GaimConnection *, GList *, GList *);
-void serv_remove_group(GaimConnection *, GaimGroup *);
 void serv_move_buddy(GaimBuddy *, GaimGroup *, GaimGroup *);
 void serv_add_permit(GaimConnection *, const char *);
 void serv_add_deny(GaimConnection *, const char *);