prosodyctl: Fix traceback when issued with no parameters

Wed, 08 Jul 2009 16:38:46 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 08 Jul 2009 16:38:46 +0100
changeset 1499
51e3e22b5316
parent 1498
481dfc89047a
child 1500
56d05ba00169

prosodyctl: Fix traceback when issued with no parameters

prosodyctl file | annotate | diff | comparison | revisions
--- a/prosodyctl	Wed Jul 08 15:23:07 2009 +0100
+++ b/prosodyctl	Wed Jul 08 16:38:46 2009 +0100
@@ -444,7 +444,7 @@
 
 ---------------------
 
-if command:match("^mod_") then -- Is a command in a module
+if command and command:match("^mod_") then -- Is a command in a module
 	local module_name = command:match("^mod_(.+)");
 	local ret, err = modulemanager.load("*", module_name);
 	if not ret then

mercurial