MCPcopy Create free account
hub / github.com/Detanup01/gbe_fork / SendUserConnectAndAuthenticate

Method SendUserConnectAndAuthenticate

dll/auth.cpp:932–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930}
931
932bool Auth_Manager::SendUserConnectAndAuthenticate( uint32 unIPClient, const void *pvAuthBlob, uint32 cubAuthBlobSize, CSteamID *pSteamIDUser )
933{
934 // HACK: Generate Steam ID from IP address for unknown clients.
935 CSteamID fallbackID(unIPClient, k_EUniversePublic, k_EAccountTypeIndividual);
936 Auth_Data data = validateTicket(pvAuthBlob, cubAuthBlobSize, fallbackID, pSteamIDUser);
937 if (!data.id.IsValid())
938 return false;
939
940 for (auto & t : inbound) {
941 if (t.id == data.id) {
942 //Should this return false?
943 launch_callback_gs(data.id, true);
944 return true;
945 }
946 }
947
948 inbound.push_back(data);
949 launch_callback_gs(data.id, true);
950 return true;
951}
952
953Auth_Data Auth_Manager::validateTicket(const void *pAuthTicket, uint32 cbAuthTicket, CSteamID fallbackID, CSteamID *pSteamIDUser)
954{

Calls 1

IsValidMethod · 0.45

Tested by

no test coverage detected