summaryrefslogtreecommitdiff
path: root/src/modules/debug_shell.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/debug_shell.lua')
-rw-r--r--src/modules/debug_shell.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/debug_shell.lua b/src/modules/debug_shell.lua
index 72be4e7..291fc0f 100644
--- a/src/modules/debug_shell.lua
+++ b/src/modules/debug_shell.lua
@@ -232,6 +232,7 @@ function debug_shell:exec_cmd(socket)
elseif(cmd == 'help') then
if(sep and sep ~= "") then socket.out_buffer = socket.out_buffer .. "unknown command\n" end
socket.out_buffer = socket.out_buffer .. "!<lua code> execute lua code\n" ..
+ "cmd <cmd> add the command to the command queue\n" ..
"quit quit this debug session\n" ..
"ping[ <data>] echo request (response will be 'pong[ <data>]')\n" ..
"disable close this debug shell instance and close all connections\n" ..
@@ -240,6 +241,12 @@ function debug_shell:exec_cmd(socket)
elseif(cmd == 'ping') then
if(sep == ' ') then socket.out_buffer = socket.out_buffer .. "pong " .. (param or "") .. "\n"
else socket.out_buffer = socket.out_buffer .. "pong\n" end
+ elseif(cmd == 'cmd') then
+ if(not param or param == '') then socket.out_buffer = socket.out_buffer .. "Error: please specify a command\n"
+ else
+ socket.out_buffer = socket.out_buffer .. "enqueing command: " .. param .. "\n"
+ command_queue:enqueue(param, nil, nil)
+ end
else
socket.out_buffer = socket.out_buffer .. "unknown command\n"
end