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); } }
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); } } } } }