Comparison

core/usermanager.lua @ 1588:9107d3221ccb

usermanager: Removed an unnecessary check
author Waqas Hussain <waqas20@gmail.com>
date Sat, 25 Jul 2009 19:15:05 +0500
parent 1585:edc066730d11
child 1589:812ae3be7bed
comparison
equal deleted inserted replaced
1587:81992255a374 1588:9107d3221ccb
67 methods["DIGEST-MD5"] = true; 67 methods["DIGEST-MD5"] = true;
68 return methods; 68 return methods;
69 end 69 end
70 70
71 function is_admin(jid) 71 function is_admin(jid)
72 local admins = config.get("*", "core", "admins") or {}; 72 local admins = config.get("*", "core", "admins");
73 if type(admins) == "table" then 73 if type(admins) == "table" then
74 jid = jid_bare(jid); 74 jid = jid_bare(jid);
75 for _,admin in ipairs(admins) do 75 for _,admin in ipairs(admins) do
76 if admin == jid then return true; end 76 if admin == jid then return true; end
77 end 77 end