itte/examples/hellobot/hellobot.servers.lua

54 lines
1.8 KiB
Lua
Raw Normal View History

2022-03-14 06:57:49 +00:00
-- ---------------------------------------------------------------------------
-- Server configuration
-- ---------------------------------------------------------------------------
-- `itte_admins`
-- Users who can access administrative functions in the client, not limited to
-- the server instance. The username is for the client only and independent of
-- IRC network usernames.
--
-- This variable is optional, but certain handlers like server disconnection
-- will not work if it is unset.
itte_admins = { demo = "password", }
2022-03-14 06:57:49 +00:00
-- `itte_servers`
-- Below is a sample server configuration.
-- If the server does not support CAP negotiation (used for SASL
-- authentication), set: cap = nil
-- `auth_type` options: nil, "pass", "sasl", "nickserv"
-- ]]
itte_servers = {
server_name = {
host = "irc.example.tld",
port = 6667,
channels = { "#channel1", "#channel2" },
cap = nil,
2022-03-14 06:57:49 +00:00
nick = "botnick",
auth_type = nil,
auth_user = "botuser",
auth_pass = nil,
2022-03-14 06:57:49 +00:00
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", },
-- Scheduled tasks.
tasks = {
hello = {
-- 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 = "th_hello",
-- The channels or users where the task handler will send messages.
recipients = { "#channel1" },
},
},
2022-03-14 06:57:49 +00:00
},
}