Skip to content

fix(cs2server): pass the GSLT to the server - #5107

Open
borzaka wants to merge 1 commit into
GameServerManagers:developfrom
borzaka:fix/cs2server-gslt
Open

borzaka wants to merge 1 commit into
GameServerManagers:developfrom
borzaka:fix/cs2server-gslt

Conversation

@borzaka

@borzaka borzaka commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

The GSLT entered during install is stored as gslt in the cs2server LinuxGSM config, but the cs2server startparameters never passed it on. The server logged into an anonymous game server account and only accepted LAN connections (No Steam account token was specified ... Connections will be restricted to LAN only).

This adds +sv_setsteamaccount ${gslt} after +exec ${selfname}.cfg. The order matters: the CS2 game server config template sets sv_setsteamaccount "", which clears a token given before it. When gslt is empty, the command only prints its usage line, so servers that set the token in the game server config keep working.

Fixes #5106

Affected servers: cs2

Type of change

  • Bug fix (a change which fixes an issue).
  • New feature (a change which adds functionality).
  • New Server (new server added).
  • Refactor (restructures existing code).
  • Chore (CI, workflows, tooling or other maintenance).
  • Comment update (typo, spelling, explanation, examples, etc).

Testing

  • Commands/tests run: on a fresh cs2server install, set startparameters in the instance config to each order, ran ./cs2server start and checked the console log with grep -E "logon token|anonymous game server|already logged into steam|Usage: sv_setsteamaccount" log/console/cs2server-console.log.
  • Result:
    • Token in gslt, +exec ${selfname}.cfg +sv_setsteamaccount ${gslt} (this PR): Logging into Steam gameserver account with logon token 'XXXXXXXX...'.
    • Token in gslt, +sv_setsteamaccount ${gslt} +exec ${selfname}.cfg: anonymous login, because the game server config line sv_setsteamaccount "" cleared the token.
    • gslt="", token only in the game server config, order of this PR: Usage: sv_setsteamaccount <login_token>, then Logging into Steam gameserver account with logon token 'XXXXXXXX...'.
    • Before this change, with the token only in gslt: anonymous login, LAN only.
  • Environment used (distro/version): Debian GNU/Linux 12.15 (bookworm) x86_64, fresh cs2server install, CS2 build current on 2026-10-26.

Risk and rollback

  • Risk level: low
  • Rollback plan: revert this commit.

Breaking changes

  • No breaking changes.
  • Breaking changes included (describe below).

Documentation

Checklist

PR will not be merged until all steps are complete.

  • This pull request links to an issue ("Fixes", or "Related to" for a partial fix).
  • This pull request uses the develop branch as its base.
  • This pull request subject follows the Conventional Commits standard.
  • This code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have provided a detailed enough description of this PR.

🤖 Generated with Claude Code

The GSLT entered during install is stored as gslt in the LinuxGSM
config, but the cs2server start parameters never passed it on. The
server logged into an anonymous game server account and only accepted
LAN connections.

Add +sv_setsteamaccount ${gslt} after +exec ${selfname}.cfg. The game
server config template sets sv_setsteamaccount "", which clears a token
given before it, so the token has to come after the exec. When gslt is
empty the command only prints its usage, so a token set in the game
server config keeps working.

Fixes GameServerManagers#5106

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the type: bugfix Pull request that fixes a bug label Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bugfix Pull request that fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant