src/plugins.c

changeset 2125
0b57b693efb8
parent 2104
8d12ab6f798c
child 2131
ef072ae1b2b8
--- a/src/plugins.c	Mon Aug 06 17:54:50 2001 +0000
+++ b/src/plugins.c	Mon Aug 06 18:12:36 2001 +0000
@@ -981,3 +981,19 @@
 	return 0;
 #endif
 }
+
+/* Calls the gaim_plugin_remove function in any loaded plugin that has one */
+void remove_all_plugins()
+{
+	GList *c = plugins;
+	struct gaim_plugin *p;
+	void (*gaim_plugin_remove)();
+
+	while (c) {
+		p = (struct gaim_plugin *)c->data;
+		if (g_module_symbol(p->handle, "gaim_plugin_remove", (gpointer *)&gaim_plugin_remove))
+			(*gaim_plugin_remove)();
+		g_free(p);
+		c = c->next;
+	}
+}

mercurial