Пример #1
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
uint64 CBaseMultiplayerPlayer::GetSteamIDAsUInt64( void )
{
	CSteamID steamIDForPlayer;
	if ( GetSteamID( &steamIDForPlayer ) )
		return steamIDForPlayer.ConvertToUint64();
	return 0;
}
Пример #2
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;
}
Пример #4
0
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
}
Пример #5
0
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");
		}
	}
}
Пример #6
0
	bool User::IsLoggedOn()
	{
		return mUserImpl->BLoggedOn() && GetSteamID().IsValid();
	}
Пример #7
0
	std::string User::GetPersonaName()
	{
		return std::move(std::string(Interface::GetInstance()->GetFriends()->GetPersonaName(GetSteamID())));
	}