From 00a12e0355dbf361647f905f3f024e8667eb08e5 Mon Sep 17 00:00:00 2001 From: Annika <56906084+AnnikaCodes@users.noreply.github.com> Date: Wed, 26 Aug 2020 08:19:24 -0700 Subject: [PATCH] Fix /unlockip's interaction with namelocks (#7252) --- server/chat-commands/moderation.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } }