From 4880b5c0c3b831797d4620ae77e83f98ba1384ee Mon Sep 17 00:00:00 2001 From: Emiel van Rooijen Date: Sun, 24 Mar 2019 19:58:23 +0100 Subject: [PATCH] Added protection to marquee channel setup formspec --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index cb52e66..d035f15 100644 --- a/init.lua +++ b/init.lua @@ -412,6 +412,11 @@ for i = 31, 255 do reset_meta(pos) end, on_receive_fields = function(pos, formname, fields, sender) + local name = sender:get_player_name() + if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then + minetest.record_protection_violation(pos, name) + return + end if (fields.channel) then minetest.get_meta(pos):set_string("channel", fields.channel) end