Diff

clix/raw.lua @ 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
parent 138:1783d4226ba1
child 150:af9b9acb10d6
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