improved username regex
This commit is contained in:
@@ -16,6 +16,7 @@ public partial class player : CharacterBody2D
|
|||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
playerName = Regex.Replace(playerName, @"\[[^]]+\]", "");
|
playerName = Regex.Replace(playerName, @"\[[^]]+\]", "");
|
||||||
|
playerName = Regex.Replace(playerName, @"<[^>]*>", "");
|
||||||
if (playerName.Length > 12)
|
if (playerName.Length > 12)
|
||||||
playerName = playerName.Substring(0, 12);
|
playerName = playerName.Substring(0, 12);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user