mod_console: EOT (Ctrl-D) closes the connection.

Fri, 31 Jul 2009 17:19:05 +0100

author
Paul Aurich <paul@darkrain42.org>
date
Fri, 31 Jul 2009 17:19:05 +0100
changeset 1623
099364ec1ab2
parent 1622
1ca7a247d04f
child 1627
6b2109012688
child 1628
c3ce7cbd123d

mod_console: EOT (Ctrl-D) closes the connection.

plugins/mod_console.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_console.lua	Wed Jul 29 18:11:37 2009 +0100
+++ b/plugins/mod_console.lua	Fri Jul 31 17:19:05 2009 +0100
@@ -70,6 +70,9 @@
 			if data:match("^>") then
 				data = data:gsub("^>", "");
 				useglobalenv = true;
+			elseif data == "\004" then
+				commands["bye"](session, data);
+				return;
 			else
 				local command = data:lower();
 				command = data:match("^%w+") or data:match("%p");

mercurial