From dc463cf1bd045ed552fe2da383441df4b2c47041 Mon Sep 17 00:00:00 2001 From: AeonicX7 <58618281+AeonicX7@users.noreply.github.com> Date: Mon, 29 Nov 2021 11:35:23 -0800 Subject: [PATCH] Allow global warns in adminlog (#8544) --- 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 c75862fb16..450f0beaaa 100644 --- a/server/chat-commands/moderation.ts +++ b/server/chat-commands/moderation.ts @@ -541,7 +541,10 @@ export const commands: Chat.ChatCommands = { return this.errorReply("Warning is unavailable in group chats."); } // If used in pms, staff, help tickets or battles, log the warn to the global modlog. - const globalWarn = !room || room.roomid === 'staff' || room.roomid.startsWith('help-') || (room.battle && !room.parent); + const globalWarn = ( + !room || ['staff', 'adminlog'].includes(room.roomid) || + room.roomid.startsWith('help-') || (room.battle && !room.parent) + ); const {targetUser, inputUsername, targetUsername, rest: reason} = this.splitUser(target); const targetID = toID(targetUsername);