Admin manager and control command dispatcher for the Eevee bot ecosystem.
The admin module manages bot administrators and permissions. It loads administrator configurations from a YAML file specified by the MODULE_CONFIG_PATH environment variable and provides administrative commands for controlling chat connectors.
This module enables authorized administrators to dynamically join and part channels across different platforms through simple commands.
- Administrator authentication and authorization
- Dynamic channel joining/parting commands
- Multi-platform support (currently IRC focused)
- NATS messaging integration
- Configurable rate limiting for commands
The module expects a YAML configuration file with the following structure:
admins:
- displayName: 'Admin Name'
uuid: '$(uuidgen)'
acceptedPlatforms:
- 'irc'
authentication:
irc:
hostmask: 'user@host.mask'displayName: Human-readable name for the administratoruuid: Unique identifier for this admin entryacceptedPlatforms: Array of platform identifiers or regex patterns this admin can operate onauthentication: Authentication methods for this adminirc.hostmask: IRC hostmask pattern for identification (supports regex)
ratelimits: Optional rate limit configuration for admin commandsjoin: Rate limits for the join commandpart: Rate limits for the part commandshowRatelimits: Rate limits for the show-ratelimits command
Each rate limit configuration supports the following fields:
mode: Either 'drop' (reject excess requests) or 'enqueue' (queue excess requests)level: Scope of the rate limit ('user', 'channel', or 'global')limit: Maximum number of requests allowedinterval: Time period for the limit (e.g., '30s', '1m', '5m')
See config/admin-config.example.yaml for a complete example.
| Variable | Required | Description |
|---|---|---|
MODULE_CONFIG_PATH |
Yes | Path to the admin configuration YAML file |
NATS_HOST |
Yes | NATS server host |
NATS_TOKEN |
Yes | NATS authentication token |
Once configured and running, authenticated administrators can use the following commands:
admin join #channel [key]
Joins the specified channel with an optional key.
admin part #channel
Parts/leaves the specified channel.
Administrators are authenticated based on their platform-specific identifiers:
- IRC: Hostmask matching (exact both exact matches and regex patterns)
Only properly authenticated administrators can execute control commands. All command attempts are logged for security auditing.
The admin module communicates with other services through NATS messaging:
- Registers commands with the command router
- Subscribes to command execution events
- Publishes control messages to chat connectors
- Node.js >= 24.0.0
# Install dependencies
npm install
# Run linter
npm run test
# Build the project
npm run build
# Development mode (build and run)
npm run dev@eeveebot/libeevee: Shared Eevee bot librarynats: NATS messaging clientjs-yaml: YAML parsingwinston: Logging framework