Merge branch 'master' into 'master'

Added protection to marquee channel setup formspec

See merge request VanessaE/led_marquee!3
This commit is contained in:
Vanessa Dannenberg 2019-03-24 19:44:27 +00:00
commit b2defa0eec

@ -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