monop-board/bot/README.md

46 lines
895 B
Markdown

# monop-board IRC Bot
Watches an IRC channel for monop-irc game output and writes `game-state.json`.
## Setup
```bash
pip install -r requirements.txt
```
## Configuration
Edit `config.json`:
```json
{
"server": "irc.darkscience.net",
"port": 6697,
"tls": true,
"nick": "monopbot",
"channel": "#your-channel",
"game_nick": "monop",
"state_file": "../game-state.json"
}
```
- `game_nick` — the IRC nick of the monop-irc game process
- `state_file` — where to write the JSON game state (relative to bot dir)
## Usage
```bash
python3 monopbot.py
```
Or with a custom config:
```bash
MONOPBOT_CONFIG=/path/to/config.json python3 monopbot.py
```
The bot will:
1. Connect to IRC and join the configured channel
2. Watch for messages from the game bot
3. Parse game events (rolls, moves, purchases, rent, etc.)
4. Write updated state to `game-state.json` after each change