usermanager: Check host exists before trying to look up admins for it
authorMatthew Wild <mwild1@gmail.com>
Tue, 05 Apr 2011 13:26:19 +0100
changeset 4237 6b0d7d94eb7f
parent 4236 75ef9ea83b07
child 4238 05f991b4a90e
child 4239 69fe5fd861e7
usermanager: Check host exists before trying to look up admins for it
core/usermanager.lua
--- a/core/usermanager.lua	Tue Apr 05 13:20:09 2011 +0100
+++ b/core/usermanager.lua	Tue Apr 05 13:26:19 2011 +0100
@@ -96,6 +96,8 @@
 end
 
 function is_admin(jid, host)
+	if host and not hosts[host] then return false; end
+
 	local is_admin;
 	jid = jid_bare(jid);
 	host = host or "*";