Option to supply a reason for banning/kicking, logic for handling question prompts in the debug console

This commit is contained in:
Joonas Rikkonen
2017-07-02 15:25:55 +03:00
parent fb5db81d10
commit da71b6bf9c
11 changed files with 185 additions and 142 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());
banList.BanPlayer("Unnamed", unauthClient.Connection.RemoteEndPoint.Address.ToString(), "Too many failed login attempts.");
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);