improved username regex

This commit is contained in:
2023-02-16 12:49:09 +01:00
parent 9c95c2d7b7
commit 9c135cc6e5

View File

@@ -16,6 +16,7 @@ public partial class player : CharacterBody2D
public override void _Ready()
{
playerName = Regex.Replace(playerName, @"\[[^]]+\]", "");
playerName = Regex.Replace(playerName, @"<[^>]*>", "");
if (playerName.Length > 12)
playerName = playerName.Substring(0, 12);