Anti-gamerfood measures:
- clients don't send server passwords as plaintext: the server sends a nonce which the client encrypt using the password as the key - IPs are visible in netstats - amount of client jobpreferences limited to 3 at the servers side - sanitizing client names
This commit is contained in:
@@ -66,7 +66,10 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (bannedPlayers.Any(bp => bp.IP == ip)) return;
|
||||
|
||||
DebugConsole.Log("Banned " + name);
|
||||
|
||||
bannedPlayers.Add(new BannedPlayer(name, ip));
|
||||
Save();
|
||||
}
|
||||
|
||||
public bool IsBanned(string IP)
|
||||
@@ -108,10 +111,13 @@ namespace Barotrauma.Networking
|
||||
BannedPlayer banned = obj as BannedPlayer;
|
||||
if (banned == null) return false;
|
||||
|
||||
DebugConsole.Log("Removing ban from " + banned.Name);
|
||||
GameServer.Log("Removing ban from " + banned.Name, null);
|
||||
|
||||
bannedPlayers.Remove(banned);
|
||||
|
||||
Save();
|
||||
|
||||
if (banFrame != null)
|
||||
{
|
||||
banFrame.Parent.RemoveChild(banFrame);
|
||||
@@ -130,7 +136,6 @@ namespace Barotrauma.Networking
|
||||
|
||||
public void Save()
|
||||
{
|
||||
|
||||
GameServer.Log("Saving banlist", null);
|
||||
|
||||
List<string> lines = new List<string>();
|
||||
|
||||
Reference in New Issue
Block a user