Diff

core/usermanager.lua @ 4237:6b0d7d94eb7f

usermanager: Check host exists before trying to look up admins for it
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 Apr 2011 13:26:19 +0100
parent 4059:cfdcad1782aa
child 4459:2ccc386b9913
line wrap: on
line diff
--- 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 "*";