summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-05-21 16:21:38 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-05-21 16:21:38 +0100
commita37e8e651e7daf12a3ca2913b4397fdf737f3ca5 (patch)
tree05c1d370f7f9e01a8c6fec5bf45113ef1ed93b0f
parentf02fe24b6138f5beb08ad88cacc0c884c2bd6c60 (diff)
added "protection_bypass" privelage support
-rw-r--r--README.md1
-rw-r--r--init.lua3
2 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 2e53f92..1af3e91 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ Released under WTFPL
areas by dropping tools and hurting player.
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 :)
+ added support for "protection_bypass" privelage.
Usage: (requires server privelage)
diff --git a/init.lua b/init.lua
index 24628d6..679cebf 100644
--- a/init.lua
+++ b/init.lua
@@ -122,7 +122,8 @@ protector.can_dig = function(r, pos, digger, onlyowner, infolevel)
-- 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
return true
end