diff options
author | Jo?o Duarte <jvsDuarte08@gmail.com> | 2019-06-26 16:46:51 +0100 |
---|---|---|
committer | Jo?o Duarte <jvsDuarte08@gmail.com> | 2019-06-26 16:46:51 +0100 |
commit | f101e7330874a67f4bf5401914fcbced634da052 (patch) | |
tree | b1a0da68c4619ae52cf116dab745e5a657652c3d /prosodyctl | |
parent | 3a8b7b6f9fda5d1494be6835b8a47ddbdd2b2292 (diff) | |
download | prosody-f101e7330874a67f4bf5401914fcbced634da052.tar.gz prosody-f101e7330874a67f4bf5401914fcbced634da052.zip |
prosodyctl: Complemented my functions with return calls, when possible
Diffstat (limited to 'prosodyctl')
-rwxr-xr-x | prosodyctl | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -10,7 +10,6 @@ -- prosodyctl - command-line controller for Prosody XMPP server -- Will be modified by configure script if run -- - CFG_SOURCEDIR=CFG_SOURCEDIR or os.getenv("PROSODY_SRCDIR"); CFG_CONFIGDIR=CFG_CONFIGDIR or os.getenv("PROSODY_CFGDIR"); CFG_PLUGINDIR=CFG_PLUGINDIR or os.getenv("PROSODY_PLUGINDIR"); @@ -93,17 +92,21 @@ function commands.list(arg) local dir = arg[1]:match("=(.+)$") -- These extra double brackets allow us to correctly process names with spaces os.execute("luarocks list --tree=".."'"..dir.."'") + return 0; else os.execute("luarocks list --tree="..prosody.paths.data.."/rocks") + return 0; end end function commands.admin_add(arg) prosodyctl.admin_operation("add ", arg) + return 0; end function commands.admin_remove(arg) prosodyctl.admin_operation("remove ", arg) + return 0; end function commands.enabled_plugins() @@ -126,6 +129,7 @@ function commands.local_plugins() end end pfile:close() + return 0 end function commands.adduser(arg) |