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:
@@ -191,7 +191,8 @@ namespace Barotrauma
|
||||
|
||||
|
||||
NewMessage("kick [name]: kick a player out from the server", Color.Cyan);
|
||||
NewMessage("ban [name]: kick and ban the player", Color.Cyan);
|
||||
NewMessage("ban [name]: kick and ban the player from the server", Color.Cyan);
|
||||
NewMessage("banip [IP address]: ban the IP address from the server", Color.Cyan);
|
||||
NewMessage("debugdraw: toggles the ''debug draw mode''", Color.Cyan);
|
||||
NewMessage("netstats: toggles the visibility of the network statistics panel", Color.Cyan);
|
||||
|
||||
@@ -289,6 +290,19 @@ namespace Barotrauma
|
||||
if (GameMain.Server == null || commands.Length < 2) break;
|
||||
GameMain.Server.KickPlayer(string.Join(" ", commands.Skip(1)), true);
|
||||
break;
|
||||
case "banip":
|
||||
if (GameMain.Server == null || commands.Length < 2) break;
|
||||
|
||||
var client = GameMain.Server.ConnectedClients.Find(c => c.Connection.RemoteEndPoint.Address.ToString() == commands[1]);
|
||||
if (client == null)
|
||||
{
|
||||
GameMain.Server.BanList.BanPlayer("Unnamed", commands[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameMain.Server.KickClient(client, true);
|
||||
}
|
||||
break;
|
||||
case "startclient":
|
||||
if (commands.Length == 1) return;
|
||||
if (GameMain.Client == null)
|
||||
|
||||
Reference in New Issue
Block a user