mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-26 00:53:44 +01:00
formspec protection added
This commit is contained in:
parent
e91e2722d1
commit
1af6d380d3
@ -82,10 +82,13 @@ minetest.register_node("sl_controller:server", {
|
|||||||
|
|
||||||
on_receive_fields = function(pos, formname, fields, player)
|
on_receive_fields = function(pos, formname, fields, player)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if fields.names and fields.names ~= "" then
|
local owner = meta:get_string("owner")
|
||||||
local names = string.gsub(fields.names, " +", " ")
|
if player:get_player_name() == owner then
|
||||||
meta:set_string("names", names)
|
if fields.names and fields.names ~= "" then
|
||||||
meta:set_string("formspec", formspec(meta))
|
local names = string.gsub(fields.names, " +", " ")
|
||||||
|
meta:set_string("names", names)
|
||||||
|
meta:set_string("formspec", formspec(meta))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user