diff options
author | James Booth <boothj5@gmail.com> | 2016-06-30 23:14:05 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-06-30 23:14:05 +0100 |
commit | ef6bad483eef8f83393623127e1a27a46fa8b221 (patch) | |
tree | e4397de79130f2be53d347f7eec957d917cb0169 /src/command/cmd_funcs.c | |
parent | 56480ce9ea25697215e677d029f0ad25f9cc8b99 (diff) | |
download | profani-tty-ef6bad483eef8f83393623127e1a27a46fa8b221.tar.gz |
/plugins unload command and completer
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r-- | src/command/cmd_funcs.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 7f3419e3..b935f13d 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -6039,6 +6039,20 @@ cmd_plugins(ProfWin *window, const char *const command, gchar **args) } 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(); GSList *curr = plugins; |