Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for digiline message field type #670

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mesecons_detector/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ local node_detector_digiline = {

if type(msg) == "table" then
if msg.distance or msg.scanname then
if msg.distance then
if msg.distance and type(msg.distance) == "string" then
Emojigit marked this conversation as resolved.
Show resolved Hide resolved
meta:set_string("distance", msg.distance)
end
if msg.scanname then
if msg.scanname and type(msg.scanname) == "string" then
meta:set_string("scanname", msg.scanname)
end
node_detector_make_formspec(pos)
Expand All @@ -240,7 +240,7 @@ local node_detector_digiline = {
else
if msg == GET_COMMAND then
node_detector_send_node_name(pos, node, channel, meta)
else
elseif type(msg) == "string" then
meta:set_string("scanname", msg)
node_detector_make_formspec(pos)
end
Expand Down