diff options
Diffstat (limited to 'safe.lua')
-rw-r--r-- | safe.lua | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -8,7 +8,14 @@ function default.get_safe_formspec(pos) end
local function has_safe_privilege(meta, player)
- if not player or 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
|