usermanager: Check host exists before trying to look up admins for it
authorMatthew Wild <mwild1@gmail.com>
Tue, 5 Apr 2011 12:26:19 +0000 (13:26 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 5 Apr 2011 12:26:19 +0000 (13:26 +0100)
core/usermanager.lua

index 5e2e41fcd31c72a53afc2de9d6e6f901d38188ec..0152afd76cd1fba5077d197ee02f552b655ab25a 100644 (file)
@@ -96,6 +96,8 @@ function get_provider(host)
 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 "*";