lua_bot allows the users of the channel to execute basic commands. Currently there are two commands supported:
!api functionname- Returns the page in the reference manual for a given function.
lua> script- Runs the lua script in a sandbox, returning any output. The command can be shortened to > in #lua.
In order to keep the bot from spamming the public channel, please take any "playing" into the #luabot channel on freenode, or address the bot via private messages.
<cladhaire> !api pcall <lua_bot> Documentation for 'pcall' can be found at http://www.lua.org/manual/5.1/manual.html#pdf-pcall <cladhaire> lua> for k,v in pairs(_G) do print(k) end <lua_bot> clad|office: tostring, os, getfenv, pairs, assert, tonumber, strsplit, load, _G, coroutine, loadstring, pp, prettyprint, string, xpcall, bit, _VERSION, strtrim, table, strjoin, strconcat, setmetatable, next, ipairs, rawequal, collectgarbage, rawset, print, math, pcall, unpack, type, select, rawget, getmetatable,... (result truncated)
Sandbox: The sandbox used in lua_bot can be found on [Github]
Source: The sandbox source is available (see above) but the IRC code is too specific to be released generally. If you're looking for a library I would suggest [LuaIRC].
Author: jnwhiteh (formerly known as Cladhaire) with help from others notably cide, shirik, and batrick.