Let ironbound chests obey protection_bypass priv

This commit is contained in:
Foz 2016-04-30 19:12:46 -04:00
parent 904b33fdf3
commit 7268f0cc97

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