diff src/server.c @ 6885:66dd420d3d23

[gaim-migrate @ 7431] Add support for removing groups in protocols. Currently, only MSN supports it, but you cannot delete group 0 (aka, "The evil ~ group of DOOM!"), so I'll add a GrossHack (TM) to not show that group if it's empty. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 18 Sep 2003 05:39:44 +0000
parents f098765ac919
children 083d1e4a9c78
line wrap: on
line diff
--- a/src/server.c	Thu Sep 18 02:56:04 2003 +0000
+++ b/src/server.c	Thu Sep 18 05:39:44 2003 +0000
@@ -490,6 +490,21 @@
 		prpl_info->remove_buddy(g, name, group);
 }
 
+void
+serv_remove_group(GaimConnection *gc, const char *name)
+{
+	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, name);
+	}
+}
+
 void serv_remove_buddies(GaimConnection *gc, GList *g, const char *group)
 {
 	GaimPluginProtocolInfo *prpl_info = NULL;