feat: add 16 extended bouncer control commands
Network control (CONNECT, DISCONNECT, RECONNECT, NICK, RAW), visibility (CHANNELS, CLIENTS, BACKLOG, VERSION), config management (REHASH, ADDNETWORK, DELNETWORK, AUTOJOIN), and NickServ operations (IDENTIFY, REGISTER, DROPCREDS). Total command count: 22. Adds stats()/db_size() to Backlog, add_network()/remove_network() to Router, and _connected_at timestamp to Client. 74 command tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -201,15 +201,9 @@ password = "" # IRC server password (optional, for PASS command)
|
||||
Send a PRIVMSG to `*bouncer` (or `bouncer`) from your IRC client to inspect
|
||||
and control the bouncer. All commands are case-insensitive.
|
||||
|
||||
```
|
||||
/msg *bouncer HELP
|
||||
/msg *bouncer STATUS
|
||||
/msg *bouncer INFO libera
|
||||
/msg *bouncer UPTIME
|
||||
/msg *bouncer NETWORKS
|
||||
/msg *bouncer CREDS
|
||||
/msg *bouncer CREDS libera
|
||||
```
|
||||
Responses arrive as NOTICE messages from `*bouncer`.
|
||||
|
||||
### Inspection
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
@@ -219,8 +213,66 @@ and control the bouncer. All commands are case-insensitive.
|
||||
| `UPTIME` | Bouncer uptime since process start |
|
||||
| `NETWORKS` | List all configured networks with state |
|
||||
| `CREDS [network]` | NickServ credential status (all or per-network) |
|
||||
| `CHANNELS [network]` | List joined channels with topics (all or per-network) |
|
||||
| `CLIENTS` | List connected bouncer clients |
|
||||
| `BACKLOG [network]` | Message counts per network and database size |
|
||||
| `VERSION` | Bouncer and Python version |
|
||||
|
||||
Responses arrive as NOTICE messages from `*bouncer`.
|
||||
### Network Control
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `CONNECT <network>` | Start a disconnected network |
|
||||
| `DISCONNECT <network>` | Stop a network |
|
||||
| `RECONNECT <network>` | Stop and restart with a fresh identity |
|
||||
| `NICK <network> <nick>` | Change nick on a network |
|
||||
| `RAW <network> <command>` | Send a raw IRC command to a network |
|
||||
|
||||
### Config Management
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `REHASH` | Reload config file, add/remove/reconnect networks |
|
||||
| `ADDNETWORK <name> key=val ...` | Create a network at runtime |
|
||||
| `DELNETWORK <name>` | Stop and remove a network |
|
||||
| `AUTOJOIN <network> +/-#channel` | Add or remove channel from autojoin list |
|
||||
|
||||
**ADDNETWORK keys:** `host` (required), `port`, `tls` (yes/no), `nick`,
|
||||
`channels` (comma-separated), `password`.
|
||||
|
||||
### NickServ
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `IDENTIFY <network>` | Force NickServ IDENTIFY with stored credentials |
|
||||
| `REGISTER <network>` | Trigger NickServ registration attempt |
|
||||
| `DROPCREDS <network> [nick]` | Delete stored NickServ credentials |
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
/msg *bouncer HELP
|
||||
/msg *bouncer STATUS
|
||||
/msg *bouncer INFO libera
|
||||
/msg *bouncer CHANNELS
|
||||
/msg *bouncer CLIENTS
|
||||
/msg *bouncer BACKLOG
|
||||
/msg *bouncer VERSION
|
||||
/msg *bouncer CONNECT libera
|
||||
/msg *bouncer DISCONNECT libera
|
||||
/msg *bouncer RECONNECT libera
|
||||
/msg *bouncer NICK libera newnick
|
||||
/msg *bouncer RAW libera WHOIS someuser
|
||||
/msg *bouncer REHASH
|
||||
/msg *bouncer ADDNETWORK oftc host=irc.oftc.net port=6697 tls=yes channels=#test
|
||||
/msg *bouncer DELNETWORK oftc
|
||||
/msg *bouncer AUTOJOIN libera +#newchannel
|
||||
/msg *bouncer AUTOJOIN libera -#oldchannel
|
||||
/msg *bouncer IDENTIFY libera
|
||||
/msg *bouncer REGISTER libera
|
||||
/msg *bouncer DROPCREDS libera
|
||||
/msg *bouncer DROPCREDS libera oldnick
|
||||
```
|
||||
|
||||
### Example Output
|
||||
|
||||
@@ -230,6 +282,19 @@ Responses arrive as NOTICE messages from `*bouncer`.
|
||||
oftc ready ceraty cloaked.user
|
||||
hackint connecting (attempt 3)
|
||||
quakenet ready spetyo --
|
||||
|
||||
[CHANNELS]
|
||||
libera #test Welcome to the test channel
|
||||
libera #dev
|
||||
oftc #debian Debian support
|
||||
|
||||
[CLIENTS]
|
||||
myuser 127.0.0.1:54321 connected 2h 15m 3s
|
||||
|
||||
[BACKLOG]
|
||||
libera 1,500 messages
|
||||
oftc 842 messages
|
||||
DB size: 2.1 MB
|
||||
```
|
||||
|
||||
## Stopping
|
||||
|
||||
Reference in New Issue
Block a user