diff options
author | Tim <t4im@users.noreply.github.com> | 2015-02-04 15:37:20 +0100 |
---|---|---|
committer | Tim <t4im@users.noreply.github.com> | 2015-02-04 15:39:08 +0100 |
commit | cb8ecbf8cf96338e61bb87a34e05f99556444252 (patch) | |
tree | 700b54653d544525ba07f0897160f19581c1237a | |
parent | efe2af2d20e70538c75f4fb592b7a8295a310f1e (diff) |
don't tostring "nil" in the teleportation tube on escape
-rw-r--r-- | teleport_tube.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/teleport_tube.lua b/teleport_tube.lua index 8647e8d..8ab4aeb 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -154,11 +154,10 @@ pipeworks.register_tube("pipeworks:teleport_tube", { meta:set_string("infotext", "unconfigured Teleportation Tube") end, on_receive_fields = function(pos,formname,fields,sender) - local new_channel = tostring(fields.channel) if not new_channel then return -- ignore escaping or clientside manipulation of the form end - new_channel = new_channel:trim() + local new_channel = tostring(fields.channel):trim() local meta = minetest.get_meta(pos) local can_receive = meta:get_int("can_receive") |