Compare commits

...

2 Commits

Author SHA1 Message Date
mio 6de32954b4 Bump release version to 1.2
- Bump rockspecs to 1.2
- (hellobot) Add explanation for scheduled tasks
2022-04-25 17:35:14 -04:00
mio a4a6b35d3e Add rockspec by Will Sinatra 2022-04-25 17:01:19 -04:00
4 changed files with 59 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Currently supported:
- Joining multiple servers - Joining multiple servers
- Ad-hoc connecting to servers and joining channels - Ad-hoc connecting to servers and joining channels
- Config reload - Config reload
- Scheduled tasks
## Installation ## Installation
@ -16,6 +17,11 @@ Currently supported:
Please see the [docs](docs/README.md). Please see the [docs](docs/README.md).
## Contributions
[Luarocks rockspec](https://luarocks.org/modules/durrendal/itte) from [Will Sinatra](http://lambdacreate.com)
## License ## License
[BSD-3.0](https://opensource.org/licenses/BSD-3-Clause) [BSD-3.0](https://opensource.org/licenses/BSD-3-Clause)

View File

@ -113,12 +113,14 @@ Codes accessible by all users:
- `ping`: send a pong message. - `ping`: send a pong message.
## Examples ## Examples
The `examples/` directory has a few demo bots to show how to use the module. The `examples/` directory has a few demo bots to show how to use the module.
- *hellobot*: a "hello world" example that greets users in several different - *hellobot*: a "hello world" example that greets users in several different
languages when they type `!hello`. languages when they type `!hello`. The source files include more information
about available configuration settings.
- *ramenkan*: a bot that serves ramen. It has some custom config settings and - *ramenkan*: a bot that serves ramen. It has some custom config settings and
scheduled tasks. scheduled tasks.

View File

@ -29,6 +29,25 @@ itte_servers = {
auth_user = "botuser", auth_user = "botuser",
auth_pass = nil, auth_pass = nil,
code_prefix = "!", code_prefix = "!",
-- Credentials for people who can access the admin commands.
-- This is specific to the bot and not tied to IRC usernames.
admins = { demouser = "password", }, admins = { demouser = "password", },
-- Scheduled tasks.
tasks = {
task1 = {
-- Interval at which tasks are performed. Options:
-- Every 5, 10, 15, 20 or 30 minutes — e.g. "5m" for 5 minutes
-- hourly, daily, weekly, monthly
interval = "daily",
-- If the interval is set to hourly, daily, weekly or monthly,
-- specify the time here. If no time is specified, the task will occur
-- at 00:00.
time = "12:00",
-- The name of the handler to run for the task.
handler = "hello",
-- The channels or users where the task handler will send messages.
recipients = { "#channel1" },
},
},
}, },
} }

View File

@ -0,0 +1,31 @@
package = "itte"
version = "1.2-1"
source = {
url = "git+https://git.tilde.town/mio/itte",
tag = "1.2",
}
description = {
summary = "Mini IRC bot module in lua",
detailed = [[
Currently supports:
- Authentication via SASL (plain) or Nickserv
- Joining multiple servers
- Ad-hoc connecting to servers and joining channels
- Config reload
]],
homepage = "https://git.tilde.town/mio/itte",
license = "BSD-3.0"
}
dependencies = {
"lua >= 5.1, < 5.4",
"luasec >= 0.9",
"luasocket >= 2.9"
}
supported_platforms = { "linux" }
build = {
type = "builtin",
modules = {
itte = "itte.lua",
itteutil = "itteutil.lua"
},
}