コード例 #1
0
ファイル: AntiCheatManager.cpp プロジェクト: aronarts/FireNET
void CAntiCheatManager::KickPlayer(uint16 channelId, EDisconnectionCause reason, int nConfidence)
{
	CGameLobby* pGameLobby = g_pGame->GetGameLobby();
	if (pGameLobby)
	{
		CryUserID userId = pGameLobby->GetUserIDFromChannelID(channelId);

		KickPlayer(userId, reason, nConfidence);
	}
}
コード例 #2
0
ファイル: AntiCheatManager.cpp プロジェクト: aronarts/FireNET
void CAntiCheatManager::BanPlayer_Internal(uint16 channelId, float timeout, int nConfidence)
{
	CGameLobby* pGameLobby = g_pGame->GetGameLobby();
	if (pGameLobby)
	{
		CryUserID userId = pGameLobby->GetUserIDFromChannelID(channelId);
		if (userId.IsValid())
		{
			ICryLobby *pLobby = gEnv->pNetwork->GetLobby();
			if (pLobby)
			{
				ICryMatchMaking *pMatchmaking = pLobby->GetMatchMaking();
				if (pMatchmaking)
				{
					pMatchmaking->Ban(&userId, timeout);
				}
			}
		}
	}
}