Lua Bot |
|
lua_bot 讓頻道使用者可以執行基本命令。目前支援兩個命令>
!api functionname
- 針對給定的函式,傳回參考手冊中的頁面。lua> script
- 在沙盒環境執行 Lua 腳本,傳回任何輸出。此命令在 #lua 中可用縮寫 >。為了避免 bot 濫發訊息於公開頻道中,請將所有「執行」動作帶到 freenode 上的 #luabot 頻道,或是透過私人訊息傳送指令給 bot。
<cladhaire> !api pcall <lua_bot> Documentation for 'pcall' can be found at https://lua.dev.org.tw/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。