#! /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")