rfcs/rfcs/rfc2.md

63 lines
2.1 KiB
Markdown

---
title: Standardising IRC Bot Behavior
author: Robert Miles <khuxkm@tilde.team>
status: Accepted
number: 2
---
## Abstract
IRC bots are programs that communicate with users through Internet Relay Chat.
These bots can do a wide assortment of things, from getting weather information
to running games. We accept IRC bots on tilde.chat, but we ask that any
prospective bot operator follow these rules.
### `!botlist` command
The botlist command is our answer to not knowing the functions a bot provides.
All conformant bots MUST respond to `!botlist` with: (examples from
[minerbot2](https://tildegit.org/khuxkm/minerbot2), my personal IRC bot)
- Maintainer (e.x.; "Maintainer: khuxkm@tilde.team")
- Small description (optional) (e.x.; "A utility bot that does some other cool
things too!")
- Command list (e.x; "Commands: !foo !bar")
For conformance with [previous standards on other tilde
boxes](https://tilde.town/wiki/socializing/irc/list-of-bots.html), bots SHOULD
also respond to `!rollcall` with at least the command list.
Please note that the prefix of `!` is constant: no matter the usual prefix of
the bot, it MUST respond to `!botlist` and/or `!rollcall` with the given prefix.
### Usermode +B
All bots on tilde.chat MUST set usermode +B on or near connect.
### Rejoin-on-kick
All bots on tilde.chat MUST NOT rejoin a channel automatically after being
kicked. If a channel operator wishes to remove your bot from their channel, you
must obey.
An exception is made for certain mechanisms to automatically rejoin;
specifically, if the channel operator can turn off the auto-rejoin behavior, it
is allowed.
## Procedural Information
### Security Considerations
There are no security considerations to this document.
### Configuration Considerations
IRC bots on tilde.chat MUST be updated to follow the botlist convention and set
usermode +B on connect.
For bots on tilde.chat coming from tilde.town, maintainer info must be added,
as well as an alias from "!botlist" to "!rollcall".
Bots made with [teambot](https://tildegit.org/team/teambot) will be updated to
set usermode +B.