A Python rewrite of the classic IRC IdleRPG bot inspired by https://idlerpg.net/.
The core game is deliberately separate from IRC. idlerpg.game.Game owns levels,
penalties, items, battles, quests, movement, and persistence-friendly state.
idlerpg.irc.IrcBot is the network adapter.
.venv/bin/python -m idlerpg --init-config idlerpg.toml
.venv/bin/python -m idlerpg --config idlerpg.tomlEdit idlerpg.toml before connecting it to a real network.
For a NickServ-registered bot nickname, set nickserv_nick and
nickserv_password in idlerpg.toml. When both are present, the bot uses SASL
PLAIN during IRC connection registration.
The IRC connection also has client-side liveness checks.
client_liveness_message_interval controls how often the bot sends a protocol
PING when connected, and defaults to 30 seconds. server_ping_timeout
controls how long a silent connection is tolerated before the socket is closed
and the normal reconnect loop starts.
Private-message the bot:
REGISTER <username> <password> <class>LOGIN <username> <password>LOGOUTSTATUS [username]ALIGN good|neutral|evilQUESTINFO
Admin private-message commands:
DELOLD <days>DEL <username>MKADMIN <username>DELADMIN <username>HOGCHPASS <username> <password>CHUSER <username> <new username>CHCLASS <username> <new class>PUSH <username> <seconds>BACKUPRELOADDBPAUSESILENT <0-3>LOGLEVEL <DEBUG|INFO|WARNING|ERROR|CRITICAL>RAW <irc protocol line>CLEARQREHASHDIERESTARTJUMP <server[:port]>PEVAL <expression>when explicitly enabled in config
The game channel is intentionally punitive: player chat, notices, nick changes, parts, quits, and kicks add time to the player's next level.
On startup, the bot scans the channel with WHO, auto-logs matching users from
the previous database state, and gives logged-in users +v.
.venv/bin/python -m unittest