mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-22 15:13:51 +01:00
Allow protection_bypass to bypass ME security.
This commit is contained in:
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
|
||||
|
Loading…
Reference in New Issue
Block a user