Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Add binding to retrieve game owner Steam ID (family sharing) #1664

Closed xaviergmail closed 4 years ago

xaviergmail commented 4 years ago

The Issue

Currently, players are able to easily bypass SteamID-based bans by making use of the Steam Family Sharing feature. By sharing Garry's Mod to a different Steam Account, clients are able to connect to a server under a different Steam ID.

While there are ways to counteract this such as banning by IP address or hardware information, the only way we can currently retrieve the game owner's Steam ID is by using the Steamworks Web API: https://partner.steamgames.com/doc/webapi/IPlayerService#IsPlayingSharedGame

This method can sometimes be error-prone, not to mention redundant.

My proposed solution

Add a binding on the Player class for OwnerSteamID().

This information is already available to the game servers in the success callback as part of the client authentication process.

For legacy authentication, view: https://partner.steamgames.com/doc/api/ISteamGameServer#GSClientApprove_t For new authentication, view: https://partner.steamgames.com/doc/api/ISteamUser#ValidateAuthTicketResponse_t

robotboy655 commented 4 years ago

Duplicate of https://github.com/Facepunch/garrysmod-requests/issues/238