From fdf25b3e5d3555aa31af2491dcad32a3ef39034f Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Fri, 22 Dec 2017 22:59:04 -0500 Subject: [PATCH] Make linux-draw understand -v from mosquitto_sub --- linux-draw.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-draw.lua b/linux-draw.lua index ca81eed..f5463c8 100644 --- a/linux-draw.lua +++ b/linux-draw.lua @@ -98,8 +98,9 @@ cqc:wrap(function() cq.poll({ pollfd = 0, events = 'r' }) local line = io.read() -- XXX :( if line == nil or line == "" then return end - printerr("line: " .. line) - dofile("lamp-remote.lua")(line) + printerr("line: " .. line) + local from, cmd = line:match("^(%S+)%s+(.*)$") + dofile("lamp-remote.lua")(cmd) end end) io.stdout:setvbuf("no") -- 2.50.1