mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 08:16:21 +00:00
Allow reloading all plugins with /plugin reload
This commit is contained in:
@@ -6053,14 +6053,15 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
} else if (g_strcmp0(args[0], "reload") == 0) {
|
||||
if (args[1] == NULL) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
gboolean res = plugins_reload(args[1]);
|
||||
if (res) {
|
||||
cons_show("Reloaded plugin: %s", args[1]);
|
||||
plugins_reload_all();
|
||||
cons_show("Reloaded all plugins");
|
||||
} else {
|
||||
cons_show("Failed to reload plugin: %s", args[1]);
|
||||
gboolean res = plugins_reload(args[1]);
|
||||
if (res) {
|
||||
cons_show("Reloaded plugin: %s", args[1]);
|
||||
} else {
|
||||
cons_show("Failed to reload plugin: %s", args[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in New Issue
Block a user