Skip to content

Repository files navigation

bnc-bot

A bot to handle BNC account requests for Snoonet

Designed for

  • Anope IRC Services v2.0.15
  • ZNC v1.8.2
  • InspIRCd with the m_services_account module

This bot may work with other systems, but this is the setup it was specifically written to work with

Requirements

  • Python 3.10+
  • A ZNC user named BNCClient to serve as the template for new accounts (see Setup below)

Setup

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.

Features

  • 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

Installation

  1. Set up a Python 3 virtualenv
  2. pip install .
  3. Copy config.default.json to config.json and modify the values as needed
  4. Run bnc-bot to start the bot note: check bnc-bot --help for command line options

Docker

An official docker image is published at ghcr.io/totallynotrobots/bnc-bot for this app.

To use it you can:

  1. Create a config.json following the format mentioned above
  2. 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.

Commands

User Commands

requestbnc

Submit a BNC account request

Admin Commands

acceptbnc <username>

Accept a BNC account request for [username]

denybnc <username>

Deny a BNC account request for [username]

delbnc <username>

Delete [username]'s BNC account

bncresetpass <username>

Reset [username]'s BNC account password

bncqueue

List all current entries in the BNC account request queue awaiting approval

bncsetadmin <username>

Grant [username] BNC admin access

bncrefresh

Update the cached version of the BNC user list

About

A bot to manage BNC account requests on Snoonet

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages