Trim spaces from name
Some troll exploited this on Landon's public server, so here's a fix.
This commit is contained in:
@@ -90,6 +90,7 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
public static string SanitizeName(string name)
|
public static string SanitizeName(string name)
|
||||||
{
|
{
|
||||||
|
name = name.Trim();
|
||||||
if (name.Length > 20)
|
if (name.Length > 20)
|
||||||
{
|
{
|
||||||
name = name.Substring(0, 20);
|
name = name.Substring(0, 20);
|
||||||
|
|||||||
Reference in New Issue
Block a user