Diff

util/prosodyctl.lua @ 4500:bfa387f268e2

Merge with 0.9
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Feb 2012 16:20:07 +0100
parent 4485:abfd27b59fa8
parent 4499:55ef5d83d00a
child 4503:6dc327809dfd
line wrap: on
line diff
--- 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