LORD

Legend of the Random Troll - IRC LORD-like Door / MUD

A turn-based LORD-style door game playable over IRC private messages, with optional Telnet and SSH access. Written in Go. SQLite-backed. Single-binary deployment.


Features (MVP)

  • IRC private message gameplay
  • Account registration & identity linking
  • Daily turns system
  • Forest encounters + combat
  • Leveling & equipment
  • SQLite persistence
  • Deterministic game engine (testable)
  • Optional Telnet/SSH front-ends (same command set)

Quick Start

1. Requirements

  • Go 1.22+
  • SQLite (bundled via Go driver, no external service required)
  • A VPS or server with outbound IRC access

2. Clone & Build

git clone https://git.supernets.org/bombuzal/LORD.git
cd LORD
go mod tidy
go build -o irclord ./cmd/bot

3. Create config.yaml:

server:
  salt: "change-this-random-secret"

irc:
  enabled: true
  network: "libera"
  address: "irc.libera.chat:6697"
  tls: true
  nick: "IRCLordBot"
  sasl_user: ""
  sasl_pass: ""

game:
  turn_max: 30
  reset_hour_utc: 0
  reset_minute_utc: 0

limits:
  per_user_per_second: 1
  burst: 3

telnet:
  enabled: false
  listen: ":2323"

ssh:
  enabled: false
  listen: ":2222"

4. Run

./irclord

Database file will auto-create (default: data/irclord.db).

IRC Usage

Private message the bot to play. Register an account, then start exploring:

/msg LORD register MyHero password123
/msg LORD stats
/msg LORD forest
/msg LORD fight

If you are identified with NickServ when you register, your IRC account is automatically linked and you won't need to log in again on future connections. Users without NickServ can use login <name> <password> each session.

For the full command reference, identity linking details, and hostmask management, see docs/USING.md.

Telnet Usage (optional)

Enable in config then:

telnet your.server 2323

Login using account name and password.

SSH Usage (optional)

Enable in config, then:

ssh player@your.server -p 2222

Deployment (systemd example)

Create /etc/systemd/system/irclord.service:

[Unit]
Description=IRC LORD Bot
After=network.target

[Service]
User=irclord
WorkingDirectory=/opt/irclord
ExecStart=/opt/irclord/irclord
Restart=always

[Install]
WantedBy=multi-user.target

Then:

sudo systemctl daemon-reload
sudo systemctl enable irclord
sudo systemctl start irclord

Arch Summary

Transport → Router → Engine → DB

  • IRC/Telnet/SSH are thin input/output layers.
  • Router handles auth + command parsing.
  • Engine is pure game logic.
  • DB persists accounts & player state.

Expanding the Game

  • Add new items via Content Packs (see docs/content-pack-spec.md)
  • Add new encounters without modifying engine core
  • Tune balance in config or content pack

Security Notes

  • Use TLS IRC connection.
  • Use SASL if possible.
  • Do not run as root.
  • Rotate logs.
  • Back up SQLite daily.
  • Change server salt before production.
Description
Legend of the Random Troll - IRC LORD-like Door/MUD
Readme ISC 8 MiB
Languages
Go 100%