From b5a5d9035f83c47e64b3b0e3343c9de519391907 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Thu, 30 Mar 2017 21:21:03 +0200 Subject: Respect protection_bypass privilege, fix crash with areas and properly record protection violations --- advtrains/advtrains_luaautomation/pcnaming.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'advtrains/advtrains_luaautomation') 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) -- cgit v1.2.3