Lua Bot |
|
lua_bot 允许频道用户执行基本命令。目前支持两个命令
!api functionname - 返回给定函数的参考手册页。lua> script - 在沙盒中运行 lua 脚本,并返回任何输出。在 #lua 频道中,该命令可以缩写为 >。为了防止机器人刷屏公开频道,请将任何“调试”操作移至 freenode 上的 #luabot 频道,或通过私信与机器人互动。
<cladhaire> !api pcall <lua_bot> Documentation for 'pcall' can be found at https://lua.ac.cn/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)
沙盒: lua_bot 中使用的沙盒可在 [Github] 上找到
源码: 沙盒源码可用(见上文),但 IRC 代码过于具体,无法普遍发布。如果您正在寻找一个库,我建议使用 [LuaIRC]。
依赖: [LuaSocket]
作者: jnwhiteh(以前称为 Cladhaire),其他人的帮助,特别是 cide、shirik 和 batrick。