mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Don't check for ban if client is a loopback address
This commit is contained in:
parent
17c8a5e49c
commit
90cf742fb5
@ -141,8 +141,11 @@ CClient* CServer::ConnectClient(CServer* pServer, user_creds_s* pChallenge)
|
||||
|
||||
if (pClient && sv_globalBanlist->GetBool())
|
||||
{
|
||||
std::thread th(SV_IsClientBanned, pClient, string(pszAddresBuffer), nNucleusID, string(pszPersonaName), nPort);
|
||||
th.detach();
|
||||
if (!pClient->GetNetChan()->GetRemoteAddress().IsLoopback())
|
||||
{
|
||||
std::thread th(SV_IsClientBanned, pClient, string(pszAddresBuffer), nNucleusID, string(pszPersonaName), nPort);
|
||||
th.detach();
|
||||
}
|
||||
}
|
||||
|
||||
return pClient;
|
||||
|
@ -89,6 +89,9 @@ void SV_CheckForBan(const BannedVec_t* pBannedVec /*= nullptr*/)
|
||||
if (!pClient->IsConnected())
|
||||
continue;
|
||||
|
||||
if (pNetChan->GetRemoteAddress().IsLoopback())
|
||||
continue;
|
||||
|
||||
const char* szIPAddr = pNetChan->GetAddress(true);
|
||||
const uint64_t nNucleusID = pClient->GetNucleusID();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user