prosodyctl: Complemented my functions with return calls, when possible
authorJoão Duarte <jvsDuarte08@gmail.com>
Wed, 26 Jun 2019 16:46:51 +0100
changeset 10138 e5132c4cfb81
parent 10137 73bae75c6d77
child 10139 3ae2809030dd
prosodyctl: Complemented my functions with return calls, when possible
prosodyctl
--- a/prosodyctl	Tue Jun 25 13:22:22 2019 +0100
+++ b/prosodyctl	Wed Jun 26 16:46:51 2019 +0100
@@ -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 @@
     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 @@
         end
     end
     pfile:close()
+    return 0
 end
 
 function commands.adduser(arg)