Changeset

4500:bfa387f268e2

Merge with 0.9
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Feb 2012 16:20:07 +0100
parents 4496:11983a1e92c0 (current diff) 4499:55ef5d83d00a (diff)
children 4503:6dc327809dfd
files util/prosodyctl.lua
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/prosody.cfg.lua.dist	Sun Feb 05 00:10:13 2012 +0500
+++ b/prosody.cfg.lua.dist	Wed Feb 08 16:20:07 2012 +0100
@@ -45,7 +45,6 @@
 		--"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 @@
 		--"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
--- a/util/prosodyctl.lua	Sun Feb 05 00:10:13 2012 +0500
+++ b/util/prosodyctl.lua	Wed Feb 08 16:20:07 2012 +0100
@@ -136,7 +136,11 @@
 		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