Skip to content

fix: prevent duplicate visible guild names - #774

Merged
darbyjack merged 3 commits into
masterfrom
fix/normalized-guild-name-uniqueness
Jul 12, 2026
Merged

fix: prevent duplicate visible guild names#774
darbyjack merged 3 commits into
masterfrom
fix/normalized-guild-name-uniqueness

Conversation

@darbyjack

@darbyjack darbyjack commented Jul 12, 2026

Copy link
Copy Markdown
Member

Summary

Prevent guild creation and renaming from accepting a name that differs from an existing guild only by color formatting or letter case.

Root cause

Guild names are stored after translating alternate color codes, while the duplicate-name check compared the stored formatted string directly against the raw command input. This allowed visually identical names such as &aKnights and &bKnights to coexist.

Changes

  • add a shared visible-name uniqueness check to GuildInputValidator
  • translate alternate color codes and remove formatting from both existing and proposed names before comparison
  • keep the comparison case-insensitive
  • use the normalized check during guild creation and guild rename
  • leave name storage and display formatting unchanged

Local validation

Compiled the exact validator locally with lightweight dependency stubs and ran standalone behavior checks covering:

  • different & colors on the same visible name
  • existing §-formatted names
  • case-only differences
  • formatting-only differences
  • genuinely distinct names and suffixes

@darbyjack
darbyjack marked this pull request as ready for review July 12, 2026 02:51
@darbyjack
darbyjack merged commit f92b88d into master Jul 12, 2026
1 check passed
@darbyjack
darbyjack deleted the fix/normalized-guild-name-uniqueness branch July 12, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant