BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
127 stars 53 forks source link

Report more information when requesting /pkToUser #303

Closed Mack29446 closed 4 months ago

Mack29446 commented 5 months ago

Please could the server report the following to the pkToUser endpoint, along with the user's PK:

These can be added to the json with any name

sla-ppy commented 4 months ago

@lionkor Assign me this issue, please.

sla-ppy commented 4 months ago

Line 292 in TNetwork.cpp: kép

So I believe I found the way to return the authkey which was simple enough. Problem arose when I wanted to figure out how Client->GetIdentifiers() returns data.

It returns an unordered map with two std::strings in it, but I am not sure what type of structure it would have. How can I go about testing this? I need to connect to my local server as a client and check it out that way dont I?

Also since we cant return a full map of strings, and instead we only want to return the actual IP address of the client, how do I guarantee that this is what I am returning from the map and not some random garbage?

Why does the user have multiple identifiers to begin with?