feat : attempt to fix bug

This commit is contained in:
2026-04-07 03:28:24 +08:00
parent 733b1da8e0
commit b6b7237dc1
3 changed files with 9 additions and 12 deletions
+4 -4
View File
@@ -125,14 +125,14 @@ func update_display_name(new_name: String) -> bool:
emit_signal("profile_update_failed", "Display name cannot be empty")
return false
if new_name.length() > 6:
emit_signal("profile_update_failed", "Display name too long (max 6 characters)")
if new_name.length() > 14:
emit_signal("profile_update_failed", "Display name too long (max 14 characters)")
return false
var regex = RegEx.new()
regex.compile("^[A-Za-z]+$")
regex.compile("^[A-Za-z0-9 ]+$")
if not regex.search(new_name):
emit_signal("profile_update_failed", "Name must contain only letters")
emit_signal("profile_update_failed", "Name can only contain letters, numbers, and spaces")
return false
# Allow guest name updates locally