Changeset

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
parents 4236:75ef9ea83b07
children 4238:05f991b4a90e 4239:69fe5fd861e7
files core/usermanager.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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 "*";