Software /
code /
clix
Changeset
149:014e73c329c5
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Apr 2021 00:21:05 +0200 |
parents | 148:27a9f28724d3 |
children | 150:af9b9acb10d6 |
files | clix/raw.lua |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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