mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 09:36:21 +00:00
/plugins unload command and completer
This commit is contained in:
@@ -6038,6 +6038,20 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args)
|
||||
cons_show("Failed to load plugin: %s", args[1]);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
} else if (g_strcmp0(args[0], "unload") == 0) {
|
||||
if (args[1] == NULL) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
gboolean res = plugins_unload(args[1]);
|
||||
if (res) {
|
||||
prefs_remove_plugin(args[1]);
|
||||
cons_show("Unloaded plugin: %s", args[1]);
|
||||
} else {
|
||||
cons_show("Failed to unload plugin: %s", args[1]);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
} else {
|
||||
GSList *plugins = plugins_get_list();
|
||||
|
||||
Reference in New Issue
Block a user