rink-rs/irc
Tiffany Bennett 9d5cb59bbc
Fix the irc bot (#169)
This has been broken for many years. I didn't have much motivation to
fix it because I wasn't actively using irc anymore.

Most of the libraries in the time in between have changed. I have to
rewrite the bot from scratch.

Unfortunately, the async ecosystem in rust is split down the middle with
tokio vs async-std. `irc` uses tokio, `rink-sandbox` uses async-std, so
they aren't compatible. I don't have the motivation to fix this yet, so
for now the IRC bot has no sandboxing support.
2024-05-27 19:04:54 -07:00
..
src Fix the irc bot (#169) 2024-05-27 19:04:54 -07:00
Cargo.toml Fix the irc bot (#169) 2024-05-27 19:04:54 -07:00
README.md Fix the irc bot (#169) 2024-05-27 19:04:54 -07:00

Rink IRC

This is an IRC bot that runs rink queries when asked.

Note that this IRC bot does not yet support sandboxing. This means that a bad query can cause the bot to OOM or to time out. It does not mean that a user would be able to pwn your system though.

How to interact with it

In an IRC channel, prefix a message with rink: and then put your query after. Direct messages are always interpreted as queries.

To add rink to a new channel, you can invite it and it will follow. It won't remember this if the bot is restarted though.

How to operate it

You'll need to create a config.toml for the bot. It uses the following format (the values show the defaults):

[behavior]
follow_invites = true

[limits]
# Not yet implemented
enabled = true
# Not yet implemented
show_metrics = true
# Not yet implemented
memory = "20MB"
# Not yet implemented
timeout = "10sec"

[currency]
# If you want rink to be able to do live currency conversions, setup a
# cron job to automatically download this file every hour or so:
# https://rinkcalc.app/data/currency.json
enabled = false
path = "./currency.json"

# This is a toml array, multiple can be specified.
[[servers]]
# The options here are the exact ones from the `irc` crate config file.
# https://github.com/aatxe/irc?tab=readme-ov-file#configuring-irc-clients
owners = ["Tiffany"]
nickname = "rink"
realname = "rinkcalc.app"
server = "irc.libera.chat"
port = 6697
use_tls = true
version = "Rink IRC bot v0.8"
source = "https://github.com/tiffany352/rink-rs"
channels = ["#rink"]