aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm/lua_repl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rspamadm/lua_repl.c')
-rw-r--r--src/rspamadm/lua_repl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/rspamadm/lua_repl.c b/src/rspamadm/lua_repl.c
index f81cf4ad3..de0f7a0ab 100644
--- a/src/rspamadm/lua_repl.c
+++ b/src/rspamadm/lua_repl.c
@@ -630,10 +630,19 @@ rspamadm_lua_run_repl (lua_State *L, bool is_batch)
if (linelen > 0) {
if (input[linelen - 1] == '\n') {
- linelen--;
+ input[linelen - 1] = '\0';
+ linelen --;
}
- rspamadm_exec_input(L, input);
+ if (linelen > 0) {
+ if (input[0] == '.') {
+ if (rspamadm_lua_try_dot_command(L, input)) {
+ continue;
+ }
+ }
+
+ rspamadm_exec_input(L, input);
+ }
}
else {
break;