Revert "Ban compromised old versions"

This reverts commit db0c83d433.
This commit is contained in:
Dennis Felsing 2024-09-22 16:36:31 +02:00
parent 804d85c7da
commit 9c799e7394
3 changed files with 0 additions and 22 deletions

View file

@ -1434,11 +1434,6 @@ bool CServer::CheckReservedSlotAuth(int ClientId, const char *pPassword)
return false; return false;
} }
void CServer::DropOldClient(int ClientId)
{
m_NetServer.Drop(ClientId, "This version of the client is compromised. Do not click the update button. ddnet.org/olddomain");
}
void CServer::ProcessClientPacket(CNetChunk *pPacket) void CServer::ProcessClientPacket(CNetChunk *pPacket)
{ {
int ClientId = pPacket->m_ClientId; int ClientId = pPacket->m_ClientId;
@ -1500,13 +1495,6 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
{ {
return; return;
} }
if(DDNetVersion < VERSION_DDNET_NEW_DOMAIN)
{
DropOldClient(ClientId);
return;
}
m_aClients[ClientId].m_ConnectionId = *pConnectionId; m_aClients[ClientId].m_ConnectionId = *pConnectionId;
m_aClients[ClientId].m_DDNetVersion = DDNetVersion; m_aClients[ClientId].m_DDNetVersion = DDNetVersion;
str_copy(m_aClients[ClientId].m_aDDNetVersionStr, pDDNetVersionStr); str_copy(m_aClients[ClientId].m_aDDNetVersionStr, pDDNetVersionStr);
@ -1524,13 +1512,6 @@ void CServer::ProcessClientPacket(CNetChunk *pPacket)
{ {
return; return;
} }
if(!m_aClients[ClientId].m_GotDDNetVersionPacket)
{
DropOldClient(ClientId);
return;
}
if(str_comp(pVersion, GameServer()->NetVersion()) != 0 && str_comp(pVersion, "0.7 802f1be60a05665f") != 0) if(str_comp(pVersion, GameServer()->NetVersion()) != 0 && str_comp(pVersion, "0.7 802f1be60a05665f") != 0)
{ {
// wrong version // wrong version

View file

@ -337,7 +337,6 @@ public:
void UpdateClientRconCommands(); void UpdateClientRconCommands();
bool CheckReservedSlotAuth(int ClientId, const char *pPassword); bool CheckReservedSlotAuth(int ClientId, const char *pPassword);
void DropOldClient(int ClientId);
void ProcessClientPacket(CNetChunk *pPacket); void ProcessClientPacket(CNetChunk *pPacket);
class CCache class CCache

View file

@ -126,8 +126,6 @@ enum
VERSION_DDNET_MULTI_LASER = 16040, VERSION_DDNET_MULTI_LASER = 16040,
VERSION_DDNET_ENTITY_NETOBJS = 16200, VERSION_DDNET_ENTITY_NETOBJS = 16200,
VERSION_DDNET_REDIRECT = 17020, VERSION_DDNET_REDIRECT = 17020,
VERSION_DDNET_NEW_DOMAIN = 16040,
}; };
typedef std::bitset<MAX_CLIENTS> CClientMask; typedef std::bitset<MAX_CLIENTS> CClientMask;