Allow global warns in adminlog (#8544)

This commit is contained in:
AeonicX7 2021-11-29 11:35:23 -08:00 committed by GitHub
parent fffa141ad0
commit dc463cf1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);