Comparison

core/usermanager.lua @ 2031:e82ceb5bbe49

usermanager: Logged a clear warning when the 'admins' option is not a table.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 21 Oct 2009 11:40:29 +0500
parent 2030:d9382a16af5b
child 2032:2714ccde2569
comparison
equal deleted inserted replaced
2030:d9382a16af5b 2031:e82ceb5bbe49
75 if type(admins) == "table" then 75 if type(admins) == "table" then
76 jid = jid_bare(jid); 76 jid = jid_bare(jid);
77 for _,admin in ipairs(admins) do 77 for _,admin in ipairs(admins) do
78 if admin == jid then return true; end 78 if admin == jid then return true; end
79 end 79 end
80 else log("debug", "Option core.admins is not a table"); end 80 elseif admins then log("warn", "Option 'admins' for host '%s' is not a table", host); end
81 return nil; 81 return nil;
82 end 82 end
83 83
84 return _M; 84 return _M;