No description
Find a file
2026-01-03 13:01:01 +01:00
.env Initial commit 2026-01-03 13:01:01 +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 Initial commit 2026-01-03 13:01:01 +01:00
README.md Initial commit 2026-01-03 13:01:01 +01:00
requirements.txt Initial commit 2026-01-03 13:01:01 +01:00

irc-chess-bot

Bot de IRC para jogar xadrez em modo "canal democratico".

Variaveis de ambiente

  • IRC_SERVER (padrao: localhost)
  • IRC_PORT (padrao: 6667)
  • IRC_CHANNEL (padrao: #chess)
  • IRC_NICK (padrao: irc-chess-bot)
  • IRC_REALNAME (padrao: IRC Chess Bot)
  • IRC_PASSWORD (opcional)
  • IRC_TLS (padrao: false)
  • IRC_TLS_VERIFY (padrao: true)
  • IRC_COLOR (padrao: false, habilita cores IRC no tabuleiro ASCII)
  • FEN_LINK_TEMPLATE (padrao: https://fen2png.com/api/?fen={fen}&raw=true)
  • STOCKFISH_ELO (padrao: 400)
  • GAME_STATE_PATH (padrao: /data/game.fen)
  • COOLDOWN_SECONDS (padrao: 5)
  • STOCKFISH_PATH (padrao: stockfish local, no Docker use /usr/games/stockfish)
  • STOCKFISH_TIME_MS (padrao: 500)
  • IRC_MAX_MSG_LEN (padrao: 380)

Executar local

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

Executar via Docker

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