mirror of
https://notabug.org/TenPlus1/protector.git
synced 2025-01-10 04:27:35 +01:00
added "protection_bypass" privelage support
This commit is contained in:
parent
f02fe24b61
commit
a37e8e651e
@ -36,6 +36,7 @@ Released under WTFPL
|
|||||||
areas by dropping tools and hurting player.
|
areas by dropping tools and hurting player.
|
||||||
1.7 - Included an edited version of WTFPL doors mod since protected doors didn't
|
1.7 - Included an edited version of WTFPL doors mod since protected doors didn't
|
||||||
work with the doors mod in the latest daily build... Now it's fine :)
|
work with the doors mod in the latest daily build... Now it's fine :)
|
||||||
|
added support for "protection_bypass" privelage.
|
||||||
|
|
||||||
Usage: (requires server privelage)
|
Usage: (requires server privelage)
|
||||||
|
|
||||||
|
3
init.lua
3
init.lua
@ -122,7 +122,8 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
|
|||||||
|
|
||||||
-- Delprotect privileged users can override protections
|
-- Delprotect privileged users can override protections
|
||||||
|
|
||||||
if minetest.check_player_privs(digger, {delprotect = true})
|
if ( minetest.check_player_privs(digger, {delprotect = true})
|
||||||
|
or minetest.check_player_privs(digger, {protection_bypass = true}) )
|
||||||
and infolevel == 1 then
|
and infolevel == 1 then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user