prosodyctl: Fix addplugin to support --help, and hide from the help listing (for now)
authorMatthew Wild <mwild1@gmail.com>
Mon, 22 Feb 2010 01:48:07 +0000
changeset 2706 c2dde8bda3fe
parent 2705 8a5af6f14c07
child 2707 749dbdbd4a00
child 2708 d9c4ade80ae9
prosodyctl: Fix addplugin to support --help, and hide from the help listing (for now)
prosodyctl
--- a/prosodyctl	Mon Feb 22 01:47:35 2010 +0000
+++ b/prosodyctl	Mon Feb 22 01:48:07 2010 +0000
@@ -504,6 +504,10 @@
 	};
 
 function commands.addplugin(arg)
+	if not arg[1] or arg[1] == "--help" then
+		show_usage("addplugin URL", "Download and install a plugin from a URL");
+		return 1;
+	end
 	local url = arg[1];
 	if url:match("^http://") then
 		local http = require "socket.http";
@@ -575,8 +579,8 @@
 	print("");
 	print("Where COMMAND may be one of:\n");
 
-	local hidden_commands = require "util.set".new{ "register", "unregister" };
-	local commands_order = { "adduser", "passwd", "deluser" };
+	local hidden_commands = require "util.set".new{ "register", "unregister", "addplugin" };
+	local commands_order = { "adduser", "passwd", "deluser", "start", "stop", "restart" };
 
 	local done = {};