Hacked clients can't send chat messages from other characters anymore

Also added sendername as userdata in chat messages, for now it's not used for anything but we'll probably find something where this is useful
This commit is contained in:
juanjp600
2016-08-30 17:35:58 -03:00
parent 07398be97e
commit 52270e3a35
7 changed files with 73 additions and 45 deletions
@@ -81,10 +81,10 @@ namespace Barotrauma.Networking
return;
}
if (ConnectedClients.Count>=config.MaximumConnections)
{
if (ConnectedClients.Count>=config.MaximumConnections)
{
inc.SenderConnection.Disconnect("Server full");
return;
return;
}
DebugConsole.NewMessage("New player has joined the server", Color.White);