Skip to content

Add getdfstatus: extended server query with player details#64

Open
neyoneit wants to merge 1 commit intoDefrag-racing:mainfrom
neyoneit:getstatus
Open

Add getdfstatus: extended server query with player details#64
neyoneit wants to merge 1 commit intoDefrag-racing:mainfrom
neyoneit:getstatus

Conversation

@neyoneit
Copy link
Copy Markdown
Member

@neyoneit neyoneit commented Mar 7, 2026

Summary

Add new UDP command getdfstatus that returns extended player info for the defrag website scraper, eliminating the need for multiple rcon calls (score, dumpuser) per player.

Player line format

# Field Source Example
1 clientId client slot index 2
2 dfscore configstring dfscore 0
3 ping cl->ping 17
4 name cl->name "[gt]neiT."
5 spectating followed player name ""
6 tld userinfo tld "CZ"
7 model userinfo model "worm"
8 headmodel userinfo headmodel "worm"
9 uid mod score XML <uid> 2640
10 color1 userinfo color1 "twitch.tv/neyoneit"

Implementation details

  • Internally executes mod's score command via Com_BeginRedirect to get MDD UIDs without rcon
  • Copies Info_ValueForKey results to local buffers to avoid static buffer overwrite (only 2 rotating buffers)
  • Same rate limiting as getstatus

No sensitive data exposed

All fields are either already public via getstatus, visible in-game, or set by the player themselves. No IPs, GUIDs, or passwords.

Credits

  • Original getdfstatus implementation by KG7X (base function with dfscore, ping, name, spectating)
  • Extended with additional fields, Info_ValueForKey buffer fix, and internal score command for MDD UIDs

Testing

Tested on a live server connected to the MDD database with logged-in players, confirming correct output of all fields including MDD UIDs retrieved via internal score command. Verified that no sensitive data (IPs, GUIDs, passwords, rcon) is exposed — all fields are either already public via getstatus or set by the player themselves.

Add new UDP command 'getdfstatus' that returns extended player info
for the defrag website scraper, eliminating the need for multiple
rcon calls (score, dumpuser) per player.

Player line format:
  clientId dfscore ping "name" "spectating" "tld" "model" "headmodel" uid "color1"

- Internally executes mod's 'score' command to get MDD UIDs without rcon
- Copies Info_ValueForKey results to local buffers to avoid static buffer overwrite
- Same rate limiting as getstatus

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@neyoneit neyoneit requested a review from KG7x March 7, 2026 01:43
@crabcrabcam
Copy link
Copy Markdown

LLM/AI generated code is of unknown source and incompatible with the GPL this software is under.

@neyoneit
Copy link
Copy Markdown
Member Author

LLM/AI generated code is of unknown source and incompatible with the GPL this software is under.

I am the maintainer of this repository and the author of this PR. I take full responsibility for the code and its GPL compliance. Using an AI assistant does not transfer authorship.

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