diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-03-30 21:21:03 +0200 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2017-03-30 21:21:03 +0200 |
commit | b5a5d9035f83c47e64b3b0e3343c9de519391907 (patch) | |
tree | 6b0ef5c26eada3a04f811b798fbbcf0485762f35 /advtrains/advtrains_luaautomation | |
parent | a091ac2e1da07b442c8f58237667287714adc838 (diff) | |
download | advtrains-b5a5d9035f83c47e64b3b0e3343c9de519391907.tar.gz advtrains-b5a5d9035f83c47e64b3b0e3343c9de519391907.tar.bz2 advtrains-b5a5d9035f83c47e64b3b0e3343c9de519391907.zip |
Respect protection_bypass privilege, fix crash with areas and properly record protection violations
Diffstat (limited to 'advtrains/advtrains_luaautomation')
-rw-r--r-- | advtrains/advtrains_luaautomation/pcnaming.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/advtrains/advtrains_luaautomation/pcnaming.lua b/advtrains/advtrains_luaautomation/pcnaming.lua index 5604749..18f1017 100644 --- a/advtrains/advtrains_luaautomation/pcnaming.lua +++ b/advtrains/advtrains_luaautomation/pcnaming.lua @@ -34,7 +34,8 @@ minetest.register_craftitem("advtrains_luaautomation:pcnaming",{ end if pointed_thing.type=="node" then local pos=pointed_thing.under - if minetest.is_protected(pos, name) then + if advtrains.is_protected(pos, pname) then + minetest.record_protection_violation(pos, name) return end local node=minetest.get_node(pos) |