fix Privilege check after bad merge

This commit is contained in:
evanpelle
2026-04-06 21:28:47 -07:00
parent 18da7134c8
commit ea7af50b25
2 changed files with 31 additions and 41 deletions
+2 -10
View File
@@ -123,16 +123,8 @@ function censorWithMatcher(
const clanTagIsProfane = clanTag
? matcher.hasMatch(clanTag) || clanTag.toLowerCase() === "ss"
: false;
const usernameIsProfane = matcher.hasMatch(nameWithoutClan);
const censoredName = usernameIsProfane
? shadowNames[simpleHash(nameWithoutClan) % shadowNames.length]
: nameWithoutClan;
// Restore clan tag only if it's clean, otherwise remove it entirely
if (clanTag && !clanTagIsProfane) {
return `[${clanTag.toUpperCase()}] ${censoredName}`;
}
const censoredClanTag =
clanTag && !clanTagIsProfane ? clanTag.toUpperCase() : null;
return { username: censoredName, clanTag: censoredClanTag };
}