Connecting Your CS 1.6 Server to Discord (Status and Alerts)

July 2, 2025 Daemon666 8 min read 1 wyświetleń

A Discord server is where a CS 1.6 community actually lives between sessions, so wiring your game server into it — live status, "players online now" pings, admin alerts — is one of the highest-leverage things you can set up. The important framing first: GoldSrc CS 1.6 has no native Discord support. Everything here is done by an external process that either queries your server (A2S) or reads its logs, then posts to Discord through a webhook or a bot. Here is how the pieces fit.

1. Decide what you want in Discord

Three distinct integrations, in rising order of complexity:

  • Live status — a channel or bot presence showing current map and player count, updated every minute.
  • Event alerts — a message when the server fills past a threshold, empties, or crashes.
  • Two-way control — running RCON commands from Discord (status, changelevel, kick).

Pick the minimum you need; two-way control is powerful but carries real risk if the bot is compromised.

2. Create a Discord webhook for one-way alerts

For status and alerts you do not need a full bot — a channel webhook is enough. In Discord: Channel Settings → Integrations → Webhooks → New Webhook, name it, and copy the webhook URL. Any process that can make an HTTPS POST can now post to that channel. Treat the webhook URL like a password — anyone who has it can post as your bot — so keep it out of public configs and out of your MOTD.

3. Push live status by querying the server

The clean, safe way to show status is to query the server from outside using the same A2S_INFO the game browser uses — it needs no access to the box, only your public IP:port. A small scheduled script queries the server, formats map and player count, and POSTs to the webhook. Because it only reads the public query port, it cannot be turned against your server. This is exactly how uptime tools work; if you already run one, see monitoring uptime with alerts and point its notifications at the Discord webhook.

4. Turn join and connect events into pings

To announce players joining, you have two options. The query-based script above can detect the count rising and post "3 players online — come play". For richer, per-player events (who connected, from where), read the server log — CS 1.6 writes connect lines to its log files, and a log-tailing script can post them. An in-game connect announcer such as CSB Connect Announce (GeoIP) shows joins to players on the server; pairing it with a log-tail-to-Discord bridge gets the same information into your Discord for the people who are not in-game yet.

5. Two-way RCON — only through a bot, never a raw password

Running commands from Discord means a bot that holds your RCON password and executes commands on the server. This is genuinely useful for admins but must be locked down: restrict the command to specific Discord roles, never post the RCON password in any channel, and rotate it if the bot host is ever exposed. The full pattern — bot, role gate, command whitelist — is covered in the Discord RCON bot guide. First harden RCON itself per secure RCON setup; a Discord bridge is only as safe as the RCON behind it.

Common errors

  • Webhook posts nothing — the URL is wrong or the webhook was deleted. Re-create it and test with a single manual POST.
  • Status always shows offline — your query script cannot reach the server. Confirm the public port is open and the server is in the browser; A2S uses the same UDP port as the game.
  • Duplicate or spammy pings — the script fires on every poll instead of on state change. Announce only when the count crosses a threshold, not every cycle.
  • Bot leaked the RCON password — someone with channel access read a logged command. Never echo RCON back to Discord; rotate the password immediately.
  • Wrong player count — the server pads with fake players, which A2S reports literally. See fake players and bot padding.

Verification

Post one test message through the webhook and confirm it appears in the channel. Start your status script and watch it update the map and count when you change the map in-game — the Discord message should follow within one poll interval. For the RCON bot, run a harmless command such as status from an authorized role and confirm the response, then confirm an unauthorized user is refused. When status tracks reality and only permitted roles can issue commands, the integration is sound.

Współtwórcy: Daemon666 ✦
Udostępnij: