diff options
Diffstat (limited to 'mesecons_luacontroller')
-rw-r--r-- | mesecons_luacontroller/init.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua index 01f5878..458286f 100644 --- a/mesecons_luacontroller/init.lua +++ b/mesecons_luacontroller/init.lua @@ -508,10 +508,15 @@ local digiline = { end } } -local function on_receive_fields(pos, form_name, fields) +local function on_receive_fields(pos, form_name, fields, sender) if not fields.program then return end + 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 reset(pos) reset_meta(pos, fields.code) local err = run(pos, {type="program"}) |