No description
Find a file
2026-01-04 23:38:47 +01:00
.env Add board modes and update docs 2026-01-04 23:38:47 +01:00
docker-compose.yml Initial commit 2026-01-03 13:01:01 +01:00
Dockerfile Initial commit 2026-01-03 13:01:01 +01:00
main.py Add board modes and update docs 2026-01-04 23:38:47 +01:00
README.md Add board modes and update docs 2026-01-04 23:38:47 +01:00
requirements.txt Initial commit 2026-01-03 13:01:01 +01:00

irc-chess-bot

IRC bot to play chess in a "democratic channel" mode.

Environment variables

  • IRC_SERVER (default: localhost)
  • IRC_PORT (default: 6667)
  • IRC_CHANNEL (default: #chess)
  • IRC_NICK (default: irc-chess-bot)
  • IRC_REALNAME (default: IRC Chess Bot)
  • IRC_PASSWORD (optional)
  • IRC_TLS (default: false)
  • IRC_TLS_VERIFY (default: true)
  • IRC_COLOR (default: false, enable IRC colors in the ASCII board)
  • IRC_BOARD_MODE (default: compat, values: compat, monospace, image)
  • FEN_LINK_TEMPLATE (default: https://fen2png.com/api/?fen={fen}&raw=true)
  • STOCKFISH_ELO (default: 400)
  • GAME_STATE_PATH (default: /data/game.fen)
  • COOLDOWN_SECONDS (default: 5)
  • STOCKFISH_PATH (default: local stockfish, in Docker use /usr/games/stockfish)
  • STOCKFISH_TIME_MS (default: 500)
  • IRC_MAX_MSG_LEN (default: 380)

Run locally

python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
export IRC_SERVER=irc.example.org
export IRC_CHANNEL=#chess
python main.py

Run with Docker

docker build -t irc-chess-bot .
docker run --rm -e IRC_SERVER=irc.example.org -e IRC_CHANNEL=#chess irc-chess-bot

Run with Docker Compose

  1. Adjust .env with the variables you want (e.g., IRC_SERVER, IRC_CHANNEL, IRC_BOARD_MODE).
  2. Start the service:
docker-compose up --build -d
  1. Tail logs:
docker-compose logs -f
  1. Stop and clean up (including orphaned containers):
docker-compose down --remove-orphans