Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
4236:75ef9ea83b07 | 4237:6b0d7d94eb7f |
---|---|
94 function get_provider(host) | 94 function get_provider(host) |
95 return hosts[host].users; | 95 return hosts[host].users; |
96 end | 96 end |
97 | 97 |
98 function is_admin(jid, host) | 98 function is_admin(jid, host) |
99 if host and not hosts[host] then return false; end | |
100 | |
99 local is_admin; | 101 local is_admin; |
100 jid = jid_bare(jid); | 102 jid = jid_bare(jid); |
101 host = host or "*"; | 103 host = host or "*"; |
102 | 104 |
103 local host_admins = config.get(host, "core", "admins"); | 105 local host_admins = config.get(host, "core", "admins"); |