Sat, 10 Apr 2021 00:21:05 +0200
clix.raw: Linearise condition
Goal of having the 'send_xml' string always exist in one place, so we
can do things with it regardless of where it came from.
clix/raw.lua | file | annotate | diff | comparison | revisions |
--- a/clix/raw.lua Mon Feb 08 22:59:49 2021 +0100 +++ b/clix/raw.lua Sat Apr 10 00:21:05 2021 +0200 @@ -110,11 +110,10 @@ onincoming = on_incoming, ondisconnect = function () end }, "*l"); else - if send_xml then - conn:send(send_xml); - else - conn:send(table.concat(args, " ")); + if not send_xml then + send_xml = table.concat(args, " "); end + conn:send(send_xml); conn:close(); end