mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 11:02:19 +00:00
Added option lovebird.echoinput, updated README.md
This commit is contained in:
@@ -21,6 +21,7 @@ lovebird.pages = {}
|
||||
lovebird.wrapprint = true
|
||||
lovebird.timestamp = true
|
||||
lovebird.allowhtml = false
|
||||
lovebird.echoinput = true
|
||||
lovebird.port = 8000
|
||||
lovebird.whitelist = { "127.0.0.1", "192.168.*.*" }
|
||||
lovebird.maxlines = 200
|
||||
@@ -32,7 +33,9 @@ lovebird.pages["index"] = [[
|
||||
-- Handle console input
|
||||
if req.parsedbody.input then
|
||||
local str = req.parsedbody.input
|
||||
lovebird.pushline({ type = 'input', str = str })
|
||||
if lovebird.echoinput then
|
||||
lovebird.pushline({ type = 'input', str = str })
|
||||
end
|
||||
xpcall(function() assert(lovebird.loadstring(str, "input"))() end,
|
||||
lovebird.onerror)
|
||||
end
|
||||
|
Reference in New Issue
Block a user