A bot to handle BNC account requests for Snoonet
This bot may work with other systems, but this is the setup it was specifically written to work with
- Python 3.10+
- A ZNC user named
BNCClientto serve as the template for new accounts (see Setup below)
New BNC accounts are created by cloning a ZNC user named BNCClient (via cloneuser BNCClient <username>), then
overriding the password, bindhost, nick, altnick, ident, and realname for the new user. This BNCClient user must
exist on the ZNC server beforehand, and any other settings on it (attached networks, channels, modules, buffer
sizes, etc.) will be inherited by every new account created by the bot.
- Assigns each user a unique bindhost in the 127.0.0.0/16 range
- Generates a temporary password for a user on request approval and sends it to them through MemoServ
- Tracks existing BNC user accounts to avoid overwriting existing accounts
- Set up a Python 3 virtualenv
pip install .- Copy
config.default.jsontoconfig.jsonand modify the values as needed - Run
bnc-botto start the bot note: checkbnc-bot --helpfor command line options
An official docker image is published at ghcr.io/totallynotrobots/bnc-bot for this app.
To use it you can:
- Create a
config.jsonfollowing the format mentioned above - Run the container with
docker run -v /path/to/config.json:/config/config.json ghcr.io/totallynotrobots/bnc-bot:latest
An optional /data volume exists as well which is where logs and runtime state are stored. This can be attached to a host directory with -v /path/to/data:/data.
Submit a BNC account request
Accept a BNC account request for [username]
Deny a BNC account request for [username]
Delete [username]'s BNC account
Reset [username]'s BNC account password
List all current entries in the BNC account request queue awaiting approval
Grant [username] BNC admin access
Update the cached version of the BNC user list