比較提交

..

1 次程式碼提交

作者 SHA1 備註 日期
mio
4edbf32ef9 Add docs
- Add more-detailed usage doc
- Add a smaller hello world example
- Include a user systemd file
- Fix config check to include second-level nested tables
2022-03-21 04:09:12 +00:00
共有 2 個檔案被更改,包括 8 行新增4 行删除

查看文件

@ -10,7 +10,7 @@
## Installation
- Install Lua and other dependencies. Examples:
- Install Lua and other dependencies. Example:
- Debian/Ubuntu-based distributions: `apt-get install lua-socket lua-sec`
@ -53,8 +53,8 @@
from IRC commands sent to the server like `JOIN` or `PART`. Name the
handler after the code word that will be used to trigger the function and
add it to `itte_handlers` so it can be automatically picked up by the
module. For example, if the code users will type is "!hello" (where the "!"
is a prefix to mark it as a bot code), name the function
module. For example, if the code users will type is `!hello` (where `!` is
a prefix to mark it as a bot code), name the function
`itte_handlers.hello()`. Handler names cannot start with numbers or special
characters.

查看文件

@ -129,7 +129,11 @@ function itte.get_config(reload)
-- Second-level nested tables
if type(v) == "table" then
for kk, vv in pairs(v) do
itte.config[k][kk] = vv
if (type(vv) == "table") or (type(vv) == "function") then
itte.config[k] = v
else
itte.config[k][kk] = vv
end
end
else
itte.config[k] = v