//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- uint64 CBaseMultiplayerPlayer::GetSteamIDAsUInt64( void ) { CSteamID steamIDForPlayer; if ( GetSteamID( &steamIDForPlayer ) ) return steamIDForPlayer.ConvertToUint64(); return 0; }
EBeginAuthSessionResult CSteamUser016::BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) { static ValidateAuthTicketResponse_t cb; cb.m_eAuthSessionResponse = k_EAuthSessionResponseOK; cb.m_SteamID = GetSteamID().ConvertToUint64(); SteamAPICall_t callID = CallbacksManager::GetSteamAPICall(); CallbacksManager::InsertResult(&cb, callID); return k_EBeginAuthSessionResultOK; }
SteamAPICall_t CSteamUser014::RequestEncryptedAppTicket(const void *pUserData, int cbUserData) { // TODO: implement this this is important Trace("SteamUser014", "RequestEncryptedAppTicket"); unsigned __int64 userID = GetSteamID().ConvertToUint64(); memset(ticketData, 0, sizeof(ticketData)); strcpy((char*)ticketData, Auth_GetSessionID()); memcpy(&ticketData[32], pUserData, min(cbUserData, sizeof(ticketData))); memcpy(&ticketData[32 + cbUserData], &userID, sizeof(userID)); SteamAPICall_t callID = CSteamBase::RegisterCall(); RequestAppTicketResponse_t* response = (RequestAppTicketResponse_t*)malloc(sizeof(RequestAppTicketResponse_t)); response->m_EResult = k_EResultOK; CSteamBase::ReturnCall(response, sizeof(RequestAppTicketResponse_t), 0, callID); return callID; }
int CSteamUser012::InitiateGameConnection(void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure) { #ifdef USE_NP if (Legacy_IsLegacyMode()) { #endif unsigned int steamID = GetSteamID().GetAccountID(); memcpy(pAuthBlob, &steamID, 4); return 4; #ifdef USE_NP } //memset(pAuthBlob, 0xdd, cbMaxAuthBlob); if (!NP_GetUserTicket(pAuthBlob, cbMaxAuthBlob, steamIDGameServer.ConvertToUint64())) { Com_Error(2, "Could not get NP user ticket."); } return sizeof(NPAuthenticateTicket); #endif }
void NczPlayer::Ban(const char * msg, int minutes) { //if (Config::GetInstance()->GetConfigData()->kick_ban) { CIFaceManager::GetInstance()->GetIengine()->ServerCommand(Helpers::format("banid %d %s\n", minutes, GetSteamID()).c_str()); Kick(msg); CIFaceManager::GetInstance()->GetIengine()->ServerCommand("writeid\n"); if(!Helpers::bStrEq("127.0.0.1", GetIPAddress())) { CIFaceManager::GetInstance()->GetIengine()->ServerCommand(Helpers::format("addip 1440 \"%s\"\n", GetIPAddress()).c_str()); CIFaceManager::GetInstance()->GetIengine()->ServerCommand("writeip\n"); } } }
bool User::IsLoggedOn() { return mUserImpl->BLoggedOn() && GetSteamID().IsValid(); }
std::string User::GetPersonaName() { return std::move(std::string(Interface::GetInstance()->GetFriends()->GetPersonaName(GetSteamID()))); }