config: >rehash command to reload rustbot.conf live (channels/nick/prefix/verbose/modules) without a restart
All checks were successful
ci / check (push) Successful in 47s

This commit is contained in:
Jean Chevronnet 2026-07-30 01:40:18 +00:00
parent 6af92c1217
commit 3c2154bbc1
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
7 changed files with 226 additions and 20 deletions

View file

@ -138,9 +138,24 @@ on), `password`, `sasl_user`, `sasl_pass`, `name` (a network's log label), and
for the board's channel "join" links, e.g. `https://web.libera.chat/`), and
`karma_url` (public web board —
enables the `karmaweb` command and a link on the `karma`/`karmabottom` top
lists; empty disables both). Whole-line `#`/`;` comments only —
lists; empty disables both), and `admin` (nicks allowed to run `rehash`; see
[Live reload](#live-reload-rehash)). Whole-line `#`/`;` comments only —
inline comments would clash with channel `#`s.
### Live reload (rehash)
Editing `rustbot.conf` doesn't require a restart. An admin sends **`rehash`**
(the command prefix + `rehash`) in a channel or PM and the bot re-reads the
file and hot-applies this network's section:
- **live**: `channels` (JOIN new / PART removed), `nick`, `prefix`, `verbose`,
and `locale` / `karma_url` / `webchat` (modules are re-instantiated).
- **needs a restart**: `server`, `port`, `tls`, SASL — the summary says so.
Set `admin = yournick` (comma/space list) to authorize; unauthorized attempts
are ignored (and logged). Adding a *new* module or a whole new `[network]`
still needs a rebuild/restart — new compiled code can't load at runtime.
### Locales
`locale` sets a network's language, so a community sees the bot in its own