mod_console: Don't allow bang bang as the first command in a session, or when the last command is unknown (fixes #218)

Fri, 12 Nov 2010 11:51:50 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 12 Nov 2010 11:51:50 +0000
changeset 3614
8b436cc88c0e
parent 3613
f617718d2221
child 3615
c72d24c2d97b

mod_console: Don't allow bang bang as the first command in a session, or when the last command is unknown (fixes #218)

plugins/mod_console.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_console.lua	Thu Nov 11 12:23:51 2010 +0000
+++ b/plugins/mod_console.lua	Fri Nov 12 11:51:50 2010 +0000
@@ -160,7 +160,7 @@
 commands.quit, commands.exit = commands.bye, commands.bye;
 
 commands["!"] = function (session, data)
-	if data:match("^!!") then
+	if data:match("^!!") and session.env._ then
 		session.print("!> "..session.env._);
 		return console_listener.onincoming(session.conn, session.env._);
 	end

mercurial