Make all admin checks use one table

This commit is contained in:
ShadowNinja
2014-07-12 19:10:26 -04:00
parent 65013863b2
commit 57c18fce95
3 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ end
-- Also checks the size of the area and if the user already
-- has more than max_areas.
function areas:canPlayerAddArea(pos1, pos2, name)
if minetest.check_player_privs(name, {areas=true}) then
if minetest.check_player_privs(name, self.adminPrivs) then
return true
end
@ -188,7 +188,7 @@ end
-- Checks if a player owns an area or a parent of it
function areas:isAreaOwner(id, name)
local cur = self.areas[id]
if cur and minetest.check_player_privs(name, {areas=true}) then
if cur and minetest.check_player_privs(name, self.adminPrivs) then
return true
end
while cur do