- Ban durations (TODO: add a way to set and view the durations through the menus).

- Separated ban & kick methods.
- Fixed compilation errors in DebugConsole when building the server.
This commit is contained in:
Joonas Rikkonen
2017-07-02 18:58:07 +03:00
parent da71b6bf9c
commit df0bdb64d6
9 changed files with 255 additions and 83 deletions
@@ -102,7 +102,7 @@ namespace Barotrauma.Networking
if (unauthClient.failedAttempts > 3)
{
//disconnect and ban after too many failed attempts
banList.BanPlayer("Unnamed", unauthClient.Connection.RemoteEndPoint.Address.ToString(), "Too many failed login attempts.");
banList.BanPlayer("Unnamed", unauthClient.Connection.RemoteEndPoint.Address.ToString(), "Too many failed login attempts.", null);
DisconnectUnauthClient(inc, unauthClient, "Too many failed login attempts. You have been automatically banned from the server.");
Log(inc.SenderConnection.RemoteEndPoint.Address.ToString() + " has been banned from the server (too many wrong passwords)", ServerLog.MessageType.Error);