From 95e06ad16955f3b49c117cc6f2d53bf4da747154 Mon Sep 17 00:00:00 2001 From: John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> Date: Wed, 19 Apr 2023 14:19:47 +0200 Subject: Add url support (downloading) to `/plugins install` Additional changes include code refactoring. --- src/command/cmd_defs.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/command/cmd_defs.c') diff --git a/src/command/cmd_defs.c b/src/command/cmd_defs.c index c6e886a5..3b9fccfd 100644 --- a/src/command/cmd_defs.c +++ b/src/command/cmd_defs.c @@ -2158,9 +2158,9 @@ static const struct cmd_t command_defs[] = { CMD_MAINFUNC(cmd_plugins) CMD_SYN( "/plugins", - "/plugins install []", + "/plugins install []", + "/plugins update []", "/plugins uninstall []", - "/plugins update []", "/plugins unload []", "/plugins load []", "/plugins reload []", @@ -2168,17 +2168,18 @@ static const struct cmd_t command_defs[] = { CMD_DESC( "Manage plugins. Passing no arguments lists installed plugins and global plugins which are available for local installation. Global directory for Python plugins is " GLOBAL_PYTHON_PLUGINS_PATH " and for C Plugins is " GLOBAL_C_PLUGINS_PATH ".") CMD_ARGS( - { "install []", "Install a plugin, or all plugins found in a directory (recursive). And loads it/them." }, + { "install []", "Install a plugin, or all plugins found in a directory (recursive), or download and install plugin (plugin name is based on basename). And loads it/them." }, + { "update []", "Uninstall and then install the plugin. Plugin name to update is basename." }, { "uninstall []", "Uninstall a plugin." }, - { "update []", "Updates an installed plugin" }, { "load []", "Load a plugin that already exists in the plugin directory, passing no argument loads all found plugins. It will be loaded upon next start too unless unloaded." }, { "unload []", "Unload a loaded plugin, passing no argument will unload all plugins." }, { "reload []", "Reload a plugin, passing no argument will reload all plugins." }, { "python_version", "Show the Python interpreter version." }) CMD_EXAMPLES( - "/plugins install", "/plugins install /home/steveharris/Downloads/metal.py", + "/plugins install https://raw.githubusercontent.com/profanity-im/profanity-plugins/master/stable/sounds.py", "/plugins update /home/steveharris/Downloads/metal.py", + "/plugins update https://raw.githubusercontent.com/profanity-im/profanity-plugins/master/stable/sounds.py", "/plugins uninstall browser.py", "/plugins load browser.py", "/plugins unload say.py", -- cgit 1.4.1-2-gfad0