Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update Soldat protocol #642

Merged
merged 8 commits into from
Sep 25, 2024
Merged

feat: update Soldat protocol #642

merged 8 commits into from
Sep 25, 2024

Conversation

CosminPerRam
Copy link
Member

@CosminPerRam CosminPerRam commented Sep 19, 2024

Closes #174
As reported in the linked issue, the support for the ASE query was removed from the game "a long time ago", and the issue was made over 4 years ago, so I'd say its safe to just replace it.
Although the new game response does not provide much data, some can be extracted from the given response of:

STARTFILES
�logs/gamestat.txt
�In-Game Statistics
Players: 0
Map: ctf_Ash
Gamemode: Capture the Flag
Timeleft: 1:52
Team 1: 0
Team 2: 0
Team 3: 0
Team 4: 0
Players list: (name/kills/deaths/team/ping)
ENDFILES

To:

{
  "name": "",
  "map": "ctf_Ash",
  "password": false,
  "raw": {
    "response": "STARTFILES\r\n\u0000\u0000\u0000�logs/gamestat.txt\r\n\u0000\u0000\u0000�In-Game Statistics\r\nPlayers: 0\r\nMap: ctf_Ash\r\nGamemode: Capture the Flag\r\nTimeleft: 8:42\r\nTeam 1: 0\r\nTeam 2: 0\r\nTeam 3: 0\r\nTeam 4: 0\r\nPlayers list: (name/kills/deaths/team/ping)\r\nENDFILES\r\n",
    "gamemode": "Capture the Flag"
  },
  "version": "",
  "maxplayers": 0,
  "numplayers": 0,
  "players": [],
  "bots": [],
  "queryPort": 23083,
  "connect": "127.0.0.1:23083",
  "ping": 1
}

Note: players should be extracted too, I'll need to test this, therefore the draft.

@CosminPerRam CosminPerRam changed the title feat: add Soldat support feat: add new protocol Soldat support Sep 19, 2024
@CosminPerRam CosminPerRam changed the title feat: add new protocol Soldat support feat: update Soldat protocol Sep 19, 2024
@CosminPerRam CosminPerRam marked this pull request as ready for review September 25, 2024 15:34
@CosminPerRam
Copy link
Member Author

Tested with a player, also added gamemode in the raw object.

@CosminPerRam
Copy link
Member Author

Queried a bunch of random servers, everything seems good.

@CosminPerRam CosminPerRam merged commit c77ca29 into master Sep 25, 2024
10 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.

Soldat - Add Support
1 participant