Mercurial > pidgin
diff src/module.c @ 2441:2c2c1f717616
[gaim-migrate @ 2454]
you can sign people on now.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sat, 06 Oct 2001 02:49:18 +0000 |
| parents | 8306c042bac7 |
| children | 7f2432a87376 |
line wrap: on
line diff
--- a/src/module.c Sat Oct 06 02:25:46 2001 +0000 +++ b/src/module.c Sat Oct 06 02:49:18 2001 +0000 @@ -527,23 +527,36 @@ void plugin_handler(struct UI *ui, guchar subtype, guchar *data) { + guint id; + struct gaim_plugin *p; + switch (subtype) { /* case CUI_PLUGIN_LIST: break; */ case CUI_PLUGIN_LOAD: - load_plugin(data); + p = load_plugin(data); /* XXX need to broadcast to UIs that plugin has been loaded */ break; - /* case CUI_PLUGIN_UNLOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + unload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been unloaded */ + } break; case CUI_PLUGIN_RELOAD: + memcpy(&id, data, sizeof(id)); + p = g_list_nth_data(plugins, id); + if (p) { + p = reload_plugin(p); + /* XXX need to broadcast to UIs that plugin has been reloaded */ + } break; - */ default: - debug_printf("unhandled plugin subtype: %d\n", subtype); + debug_printf("unhandled plugin subtype %d\n", subtype); break; } }
