Accepts underscore and dash as valid characteres for user name

This commit is contained in:
Makinolo 2022-02-17 14:42:54 -07:00
parent f283a3391c
commit a52be608a2

View File

@ -576,7 +576,7 @@ namespace CoopServer
local.Deny("Username is empty or contains spaces!");
return;
}
if (packet.Username.Any(p => !char.IsLetterOrDigit(p)))
if (packet.Username.Any(p => !char.IsLetterOrDigit(p) && !(p == '_') && !(p=='-')))
{
local.Deny("Username contains special chars!");
return;