changeset 0 | 89add07d6fe4 |
child 1 | cca972635e5e |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcbot/mcbot_shell.lua Sun Apr 11 18:13:18 2010 +0200 @@ -0,0 +1,18 @@ +#! /usr/bin/env lua + +require "mcbot_engine" + +local function mcbot_mainloop (BotName) + while true do + local l = io.stdin:read'*l' + if l == nil then break end + local res, errmsg = process(l, BotName, false) + if res then + print(res) + else + if errmsg then print(errmsg) end + end + end +end + +mcbot_mainloop("mcbot")