Commit Graph

11 Commits (17fb088c0fd0d0d77d103b4b8b3993ef7d30a6f1)

Author SHA1 Message Date
mio 8e84095be6 Change the behaviour of service code detection
- Parse service codes if they are sent as `!code` or `nick: !code` in channels
  and private messages (where `!code` is an example code prefix and service
  code, and `nick` is the bot's nick). If the service code is not provided at
  the start of the message body, it will be treated as a message without a
  service code and passed to the target handler.

- If a target handler is defined, both messages in the form `nick: message`
  in a channel and `message` in a private message will be sent to the handler.
  The `nick:` at the start of `nick: message` will no longer be filtered out.

  The default name of the target handler is `target`, as in
  `itte_handlers.target(cxt, msg)`. This can be changed in the config by
  setting a new `itte_config.target_handler` value.
2022-04-28 23:16:30 -04:00
mio 562f112995 Add preliminary support for "nick: message" detection 2022-04-28 02:40:57 -04:00
mio 20652e5e31 Add function to get a list of users in a channel 2022-04-27 23:20:09 -04:00
mio f5302105f0 Remove unused variables 2022-04-27 22:05:51 -04:00
mio de2643183f Fix task repetition
- Fix task scheduling not repeating and resulting in high cpu usage
- Fix pong response triggered by user message
- Add timestamp to debug output
2022-04-09 01:28:59 -04:00
mio 971b758524 Try to handle pings better
- Send a pong anyway if no ping request was detected after 120s
- (ramenkan) minor text adjustments
2022-04-04 00:31:52 -04:00
mio e9927fb1d7 Add scheduled tasks 2022-04-01 04:14:15 -04:00
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
mio 75d3f149f2 Add handlers to list servers/channels, connect to/quit servers
- Add handlers to list connected servers and channels
- Add handlers to connect and disconnect from servers
- Check user config and only override specified settings
- Redact parameters in admin-only handlers from debug output to avoid
  logging potential passwords
- Set admin-only handlers to respond only in private messages
- Include list of admin handlers for customisation
- Extract debug strings to a table for customisation
2022-03-20 03:42:25 +00:00
mio 7963d7221c Bugfixes
- Add global admins table, set disconnect and reload built-in handlers to be
  accessible by global admins only
- Only send an unknown code error in private messages to avoid responding to
  other bots' codes when there is a prefix collision
- Fix server contexts not being updated after a config reload
- Fix service codes being improperly parsed in privmsgs when different code
  prefixes are used
- Fix joining channels on some networks when connecting without
  authentication
- Fix disconnecting from one server also causing disconnection from other
  servers
2022-03-19 17:33:07 +00:00
mio 9005c0fba5 Rewrite module in Lua 2022-03-14 06:57:49 +00:00