Ignore servers in serverlist that specify an invalid player count

This commit is contained in:
Jan 2021-08-20 18:42:47 +02:00
parent 4ab20ae8f5
commit d44039e82e

View File

@ -472,6 +472,11 @@ namespace Components
// Remove server from queue // Remove server from queue
i = ServerList::RefreshContainer.servers.erase(i); i = ServerList::RefreshContainer.servers.erase(i);
// Servers with more than 18 players or less than 0 players are faking for sure
// So lets ignore those
if (server.clients > 18 || server.maxClients > 18 || server.clients < 0 || server.maxClients < 0)
return;
// Check if already inserted and remove // Check if already inserted and remove
auto list = ServerList::GetList(); auto list = ServerList::GetList();
if (!list) return; if (!list) return;