diff --git a/server/chat-commands/moderation.ts b/server/chat-commands/moderation.ts index 7657b4c32c..1357e136a7 100644 --- a/server/chat-commands/moderation.ts +++ b/server/chat-commands/moderation.ts @@ -860,7 +860,10 @@ export const commands: ChatCommands = { for (const curUser of Users.findUsers([], [target])) { if (curUser.locked && !curUser.locked.startsWith('#') && !Punishments.getPunishType(curUser.id)) { curUser.locked = null; - curUser.namelocked = null; + if (curUser.namelocked) { + curUser.namelocked = null; + curUser.resetName(); + } curUser.updateIdentity(); } }