Merge pull request #13 from FozLand/access

Let ironbound chests obey protection_bypass priv
This commit is contained in:
philipbenr 2016-05-01 06:18:11 +00:00
commit 5772fbd80c

View File

@ -225,7 +225,14 @@ function default.get_ironbound_chest_formspec(pos)
end
local function has_ironbound_chest_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then
local name = ""
if player then
if minetest.check_player_privs(player, "protection_bypass") then
return true
end
name = player:get_player_name()
end
if name ~= meta:get_string("owner") then
return false
end
return true