diff options
author | Tim <t4im@users.noreply.github.com> | 2015-03-05 11:14:30 +0100 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2015-03-11 19:36:41 +0100 |
commit | d167aacf4d2cdcc98914cd05153b81e709e0eaa7 (patch) | |
tree | 5442649cd3416487bfb5e33faa9576884692866f /teleport_tube.lua | |
parent | 86ee58b17c2ec9ad303116cf76cfac354cf0f484 (diff) |
add ownership/protection handling for device configuration
take any available ownership into account before deciding on area protection
Diffstat (limited to 'teleport_tube.lua')
-rw-r--r-- | teleport_tube.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/teleport_tube.lua b/teleport_tube.lua index 4a663d5..17beb06 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -154,8 +154,9 @@ pipeworks.register_tube("pipeworks:teleport_tube", { meta:set_string("infotext", "unconfigured Teleportation Tube") end, on_receive_fields = function(pos,formname,fields,sender) - if not fields.channel then - return -- ignore escaping or clientside manipulation of the form + if not fields.channel -- ignore escaping or clientside manipulation of the form + or not pipeworks.may_configure(pos, sender) then + return end local new_channel = tostring(fields.channel):trim() |