--- 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; + } +}