Skip to content

Add Exfil's API with a fallback to Source protocol#209

Merged
BattlefieldDuck merged 4 commits intoDiscordGSM:mainfrom
altNightHawk:feature/exfil-api-A2S-backup
Mar 3, 2026
Merged

Add Exfil's API with a fallback to Source protocol#209
BattlefieldDuck merged 4 commits intoDiscordGSM:mainfrom
altNightHawk:feature/exfil-api-A2S-backup

Conversation

@altNightHawk
Copy link
Contributor

Adds support for Exfil's new API, with automatic fallback to A2S query.

Features:

  • Two-stage query strategy:
    • Stage 1 (Primary): HTTP API call to http://{host}:{port}/status
    • Stage 2 (Fallback): Source protocol (A2S query) via opengsq
  • Comprehensive field mapping with multiple fallback options

Field Mapping:

API Format Field Output
Exfil serverName name
Exfil players (int) numplayers
Exfil maxPlayers (int) maxplayers
Exfil playerList (array) players
A2S SteamServerName_s name
A2S Players_s (X/Y) numplayers/maxplayers

@BattlefieldDuck
Copy link
Member

Thanks! FYI this PR flips some files to executable (100755). Please chmod -x these and push:
discordgsm/games.csv, discordgsm/protocols/__init__.py, discordgsm/protocols/exfil.py.
After that I’ll merge.

@BattlefieldDuck
Copy link
Member

BattlefieldDuck commented Mar 1, 2026

Thanks, can you check https://github.com/DiscordGSM/GameServerMonitor/pull/209/changes too, seems the diff is still much larger than expected (looks like line-ending/whitespace churn)

@altNightHawk
Copy link
Contributor Author

Sorry about that, I don't know how my VS Code got stuck thinking it was Windows.

from discordgsm.gamedig import GamedigResult

logger = logging.getLogger(__name__)
12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove it? It’ll cause a syntax/runtime issue on import.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@BattlefieldDuck
Copy link
Member

Thanks

@BattlefieldDuck BattlefieldDuck merged commit a8435d1 into DiscordGSM:main Mar 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants