author | Mikael Berthe <mikael@lilotux.net> |
Tue, 07 Oct 2014 19:40:50 +0200 | |
changeset 69 | 2fe667e012d9 |
parent 66 | d9c00a9fe9d5 |
permissions | -rwxr-xr-x |
#! /usr/bin/env lua -- This is a small wrapper to call the mcabbot engine from a shell -- (i.e. without mcabber). require "mcbot_engine" local function mcbot_mainloop (BotName) local data = { ["nickname"] = BotName } while true do local l = io.stdin:read'*l' if l == nil then break end local res, errmsg = process(l, data, false) if res then print(res) else if errmsg then print(errmsg) end end end end mcbot_mainloop("mcbot")