Server setting for selecting which symbols are allowed in client names. The default setting includes symbols from the character ranges Basic Latin, Latin-1 Supplement, Latin Extended A & B and Cyrillic. Closes #534

This commit is contained in:
Joonas Rikkonen
2018-08-08 17:07:08 +03:00
parent 2f0236d99b
commit 92f3ac5469
4 changed files with 53 additions and 17 deletions
@@ -165,7 +165,7 @@ namespace Barotrauma.Networking
DebugConsole.NewMessage(clName + " (" + inc.SenderConnection.RemoteEndPoint.Address.ToString() + ") couldn't join the server (not in whitelist)", Color.Red);
return;
}
if (!Client.IsValidName(clName))
if (!Client.IsValidName(clName, this))
{
DisconnectUnauthClient(inc, unauthClient, "Your name contains illegal symbols.");
Log(clName + " (" + inc.SenderConnection.RemoteEndPoint.Address.ToString() + ") couldn't join the server (invalid name)", ServerLog.MessageType.Error);