Added option lovebird.echoinput, updated README.md

This commit is contained in:
rxi
2014-06-28 12:10:53 +01:00
parent 441d2f5327
commit d85a4ee47d
2 changed files with 8 additions and 1 deletions

View File

@@ -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