aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-02-08 16:20:07 +0100
committerMatthew Wild <mwild1@gmail.com>2012-02-08 16:20:07 +0100
commit5958b69a5d3817e9b2e0828c336454220473c228 (patch)
treee1fb3b2356572fbfc31b61874e7cc7b501dbbcca /util/prosodyctl.lua
parent86dbec26c8257844a032ac1b53188ef41452c1cb (diff)
parent4727cb1adaeac099ca2cbd3629271199f8c79da3 (diff)
downloadprosody-5958b69a5d3817e9b2e0828c336454220473c228.tar.gz
prosody-5958b69a5d3817e9b2e0828c336454220473c228.zip
Merge with 0.9
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r--util/prosodyctl.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua
index 8c58f2cd..128eec2c 100644
--- a/util/prosodyctl.lua
+++ b/util/prosodyctl.lua
@@ -136,7 +136,11 @@ function adduser(params)
return false, "invalid-hostname";
end
- local provider = prosody.hosts[host].users;
+ local host = prosody.hosts[host];
+ if not host then
+ return false, "no-such-host";
+ end
+ local provider = host.users;
if not(provider) or provider.name == "null" then
usermanager.initialize_host(host);
end