Allow protection_bypass to bypass ME security.

This commit is contained in:
James David Clarke 2024-01-14 21:22:45 +00:00
parent b4db66d76f
commit 29df086d53

@ -79,14 +79,17 @@ end
function network:get_access_level(player)
local name
local has_bypass = minetest.check_player_privs(player, "protection_bypass")
if not player then
return self.default_access_level
elseif has_bypass then
return me.constants.access_levels.full
elseif type(player) == "string" then
name = player
else
name = player:get_player_name()
end
if not self.access then
if not self.access or not then
return self.default_access_level
end
return self.access[name] or self.default_access_level