aboutsummaryrefslogtreecommitdiffstats
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
commitaf572a612080a6fd777fe2bdcb6780f40ad2fd87 (patch)
treee1fb3b2356572fbfc31b61874e7cc7b501dbbcca
parent84090686e42fa1e0ea3da654e5270d95fcf97434 (diff)
parentd75e3d56b5128e4489f635a412cb12bf02e9f18f (diff)
downloadprosody-af572a612080a6fd777fe2bdcb6780f40ad2fd87.tar.gz
prosody-af572a612080a6fd777fe2bdcb6780f40ad2fd87.zip
Merge with 0.9
-rw-r--r--prosody.cfg.lua.dist2
-rw-r--r--util/prosodyctl.lua6
2 files changed, 6 insertions, 2 deletions
diff --git a/prosody.cfg.lua.dist b/prosody.cfg.lua.dist
index e513b116..db85a70b 100644
--- a/prosody.cfg.lua.dist
+++ b/prosody.cfg.lua.dist
@@ -45,7 +45,6 @@ modules_enabled = {
--"compression"; -- Stream compression
-- Nice to have
- "legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
@@ -67,6 +66,7 @@ modules_enabled = {
--"welcome"; -- Welcome users who register accounts
--"watchregistrations"; -- Alert admins of registrations
--"motd"; -- Send a message to users when they log in
+ --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
};
-- These modules are auto-loaded, should you
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