Discord to IRC bridge
  • C 88.6%
  • JavaScript 6.3%
  • Meson 1.7%
  • Just 1.3%
  • PowerShell 1%
  • Other 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-24 07:14:28 +00:00
lib Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
nginx meta files 2026-07-14 19:20:38 +02:00
scripts Add container support (Containerfile, just recipe, smoke test) 2026-09-24 00:28:12 +10:00
src Separate SASL, NickServ and oper credentials; add SASL-first auth 2026-09-24 17:13:57 +10:00
test Separate SASL, NickServ and oper credentials; add SASL-first auth 2026-09-24 17:13:57 +10:00
.clang-format Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
.clang-tidy Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
.containerignore Keep credentials and config out of the container image 2026-09-24 00:39:02 +10:00
.gitignore Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
.gitmodules Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
Containerfile Keep credentials and config out of the container image 2026-09-24 00:39:02 +10:00
example-conf.json Separate SASL, NickServ and oper credentials; add SASL-first auth 2026-09-24 17:13:57 +10:00
justfile Add container support (Containerfile, just recipe, smoke test) 2026-09-24 00:28:12 +10:00
LICENSE Initial commit 2026-05-05 17:26:34 +02:00
meson.build Add IRC auto-reconnect and unit tests 2026-09-24 01:02:06 +10:00
native.ini Migrate Discord backend to concord; switch to Meson + LLVM toolchain 2026-09-23 23:47:45 +10:00
README.md Keep credentials and config out of the container image 2026-09-24 00:39:02 +10:00

slopbridge

An IRC ↔ Discord bridge.

Requirements

  • Meson (>= 1.3) and Ninja
  • A C11 compiler
  • OpenSSL >= 3.0 development headers (the bridge uses EVP_Q_digest)
  • libcurl >= 8.7.1 built with --enable-websockets (required by concord)

Building

git clone ...
cd slopbridge
git submodule update --init --recursive
meson setup build
meson compile -C build
./build/slopbridge <path-to-config>

The vendored lib/concord is built in-tree via its own Makefile and linked statically; lib/yyjson and lib/lirc are compiled directly by Meson.

Configuration

See example-conf.json for the expected layout. Required Discord fields are bot_token, webhook_id, webhook_token and channel_id. The bot's application id (used to print the invite URL) is resolved automatically from the Discord READY event.

Any string value may reference an environment variable with ${VAR} syntax, which is expanded at startup — useful for keeping credentials out of the config file:

{ "discord": { "bot_token": "${DISCORD_TOKEN}", "webhook_token": "${WEBHOOK_TOKEN}" } }

Container (Podman)

Build the image (assumes submodules are already initialized):

just container          # or: podman build -t slopbridge .

Run it, mounting the config and data directories from the host — nothing sensitive is baked into the image:

podman run --rm \
  -v "$PWD/config.json:/config.json:ro" \
  -v /var/redirects:/var/redirects \
  -v /var/txt:/var/txt \
  slopbridge /config.json

Credentials can instead be passed as environment variables, with the config referencing them via ${VAR}:

podman run --rm \
  -e DISCORD_TOKEN=... -e WEBHOOK_ID=... -e WEBHOOK_TOKEN=... -e CHANNEL_ID=... \
  -v "$PWD/config.json:/config.json:ro" \
  slopbridge /config.json

scripts/test-container.ps1 smoke-tests the image from Windows PowerShell.