don't tostring "nil" in the teleportation tube on escape

This commit is contained in:
Tim 2015-02-04 15:37:20 +01:00
parent efe2af2d20
commit cb8ecbf8cf
1 changed files with 1 additions and 2 deletions

View File

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