Compare commits
1 Commits
4edbf32ef9
...
86c7eaf04c
Author | SHA1 | Date |
---|---|---|
mio | 86c7eaf04c |
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- Install Lua and other dependencies. Example:
|
- Install Lua and other dependencies. Examples:
|
||||||
|
|
||||||
- Debian/Ubuntu-based distributions: `apt-get install lua-socket lua-sec`
|
- 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
|
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
|
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
|
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 `!` is
|
module. For example, if the code users will type is "!hello" (where the "!"
|
||||||
a prefix to mark it as a bot code), name the function
|
is a prefix to mark it as a bot code), name the function
|
||||||
`itte_handlers.hello()`. Handler names cannot start with numbers or special
|
`itte_handlers.hello()`. Handler names cannot start with numbers or special
|
||||||
characters.
|
characters.
|
||||||
|
|
||||||
|
|
4
itte.lua
4
itte.lua
|
@ -129,12 +129,8 @@ function itte.get_config(reload)
|
||||||
-- Second-level nested tables
|
-- Second-level nested tables
|
||||||
if type(v) == "table" then
|
if type(v) == "table" then
|
||||||
for kk, vv in pairs(v) do
|
for kk, vv in pairs(v) do
|
||||||
if (type(vv) == "table") or (type(vv) == "function") then
|
|
||||||
itte.config[k] = v
|
|
||||||
else
|
|
||||||
itte.config[k][kk] = vv
|
itte.config[k][kk] = vv
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
itte.config[k] = v
|
itte.config[k] = v
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue