diff options
Diffstat (limited to 'NorthstarDedicatedTest/sv_rcon.cpp')
-rw-r--r-- | NorthstarDedicatedTest/sv_rcon.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/sv_rcon.cpp b/NorthstarDedicatedTest/sv_rcon.cpp index ec2abfca..1dcfff32 100644 --- a/NorthstarDedicatedTest/sv_rcon.cpp +++ b/NorthstarDedicatedTest/sv_rcon.cpp @@ -263,6 +263,7 @@ void CRConServer::Authenticate(const cl_rcon::request& cl_request, CConnectedNet ::send(pData->m_hSocket, svWrongPass.c_str(), static_cast<int>(svWrongPass.size()), MSG_NOSIGNAL); pData->m_bAuthorized = false; + pData->m_bValidated = false; pData->m_nFailedAttempts++; } } @@ -340,6 +341,7 @@ void CRConServer::ProcessMessage(const cl_rcon::request& cl_request) std::string svMessage = this->Serialize(s_pszNoAuthMessage, "", sv_rcon::response_t::SERVERDATA_RESPONSE_AUTH); ::send(pData->m_hSocket, svMessage.c_str(), static_cast<int>(svMessage.size()), MSG_NOSIGNAL); + pData->m_bValidated = false; pData->m_nIgnoredMessage++; return; } @@ -399,6 +401,12 @@ void CRConServer::Execute(const cl_rcon::request& cl_request) const //----------------------------------------------------------------------------- bool CRConServer::CheckForBan(CConnectedNetConsoleData* pData) { + if (pData->m_bValidated) + { + return false; + } + + pData->m_bValidated = true; CNetAdr2 netAdr2 = m_pSocket->GetAcceptedSocketAddress(m_nConnIndex); // Check if IP is in the ban vector. |