1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

[mesecons] Update

This commit is contained in:
LeMagnesium
2016-08-01 00:30:16 +02:00
parent e0a3d098f5
commit f8fd6f05d5
6 changed files with 81 additions and 51 deletions

View File

@ -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"})