From 534364e9c332e41d8bc93d482fe06fe0801e3136 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 3 Jul 2018 13:24:05 +0100 Subject: [PATCH] formspec can only write data to actual protection nodes --- init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.lua b/init.lua index edcd14c..bf3d340 100644 --- a/init.lua +++ b/init.lua @@ -535,6 +535,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) return end + -- are we adding member to a protection node ? (csm protection) + local nod = minetest.get_node(pos).name + + if nod ~= "protector:protect" + and nod ~= "protector:protect2" then + return + end + -- add member [+] if fields.protector_add_member then