2022-05-20 11:52:19 +02:00
|
|
|
#include "core/stdafx.h"
|
|
|
|
#include "engine/server/sv_main.h"
|
|
|
|
#include "networksystem/r5net.h"
|
|
|
|
#include "public/include/bansystem.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Purpose: checks if particular client is banned on the comp server
|
|
|
|
//-----------------------------------------------------------------------------
|
2022-06-14 20:56:55 +02:00
|
|
|
void SV_IsClientBanned(R5Net::Client* pR5net, const string svIPAddr, uint64_t nNucleusID)
|
2022-05-20 11:52:19 +02:00
|
|
|
{
|
2022-06-14 20:56:55 +02:00
|
|
|
string svError = string();
|
|
|
|
|
2022-05-20 11:52:19 +02:00
|
|
|
bool bCompBanned = pR5net->GetClientIsBanned(svIPAddr, nNucleusID, svError);
|
|
|
|
if (bCompBanned)
|
|
|
|
{
|
2022-06-14 20:56:55 +02:00
|
|
|
DevMsg(eDLL_T::SERVER, "Connection rejected for '%s' ('%llu' is banned from the master server!)\n", svIPAddr.c_str(), nNucleusID);
|
2022-05-20 11:52:19 +02:00
|
|
|
g_pBanSystem->AddConnectionRefuse(svError, nNucleusID); // Add to the vector.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|