mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-26 09:03: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)
|
function network:get_access_level(player)
|
||||||
local name
|
local name
|
||||||
|
local has_bypass = minetest.check_player_privs(player, "protection_bypass")
|
||||||
if not player then
|
if not player then
|
||||||
return self.default_access_level
|
return self.default_access_level
|
||||||
|
elseif has_bypass then
|
||||||
|
return me.constants.access_levels.full
|
||||||
elseif type(player) == "string" then
|
elseif type(player) == "string" then
|
||||||
name = player
|
name = player
|
||||||
else
|
else
|
||||||
name = player:get_player_name()
|
name = player:get_player_name()
|
||||||
end
|
end
|
||||||
if not self.access then
|
if not self.access or not then
|
||||||
return self.default_access_level
|
return self.default_access_level
|
||||||
end
|
end
|
||||||
return self.access[name] or self.default_access_level
|
return self.access[name] or self.default_access_level
|
||||||
|
Loading…
Reference in New Issue
Block a user