2010-03-01 [iwkse] 3.7.5cvs29
[claws.git] / src / common / plugin.c
index 3a9619ba9b444d097928c490ad8588881cd4b9ad..34981cda09aec0879157ec497a8c7574cd1adda5 100644 (file)
@@ -566,6 +566,22 @@ GSList *plugin_get_list(void)
        return new;
 }
 
+Plugin *plugin_get_loaded_by_name(const gchar *name) 
+{
+       Plugin *plugin = NULL;
+       GSList *new, *cur; 
+       new = plugin_get_list();
+       for (cur = new; cur; cur = g_slist_next(cur)) {
+               plugin = (Plugin *)cur->data;
+               if (!g_ascii_strcasecmp(plugin->name(), name)) 
+                       break;
+               else 
+                       plugin = NULL;
+       }
+       g_slist_free(new);
+       return plugin;
+}
+
 GSList *plugin_get_unloaded_list(void)
 {
        return g_slist_copy(unloaded_plugins);