Hacked client can't join full server anymore

Not sure how they can get around lidgren's checking, but this should do the trick
This commit is contained in:
juanjp600
2016-08-29 19:02:37 -03:00
parent 83f8ad0555
commit df0b064899
2 changed files with 12 additions and 9 deletions

View File

@@ -81,6 +81,12 @@ namespace Barotrauma.Networking
return;
}
if (ConnectedClients.Count>=config.MaximumConnections)
{
inc.SenderConnection.Disconnect("Server full");
return;
}
DebugConsole.NewMessage("New player has joined the server", Color.White);
byte userID;