allow use of /warn in subroomgroupchats

This commit is contained in:
Zerapium 2025-07-09 12:39:34 +05:30
parent 3bab394e1b
commit 88f06dc404

View File

@ -538,7 +538,7 @@ export const commands: Chat.ChatCommands = {
warn(target, room, user) {
if (!target) return this.parse('/help warn');
this.checkChat();
if (room?.settings.isPersonal && !user.can('warn' as any)) {
if (room?.settings.isPersonal && !user.can('warn' as any) && !room.parent) {
throw new Chat.ErrorMessage("Warning is unavailable in group chats.");
}
// If used in pms, staff, help tickets or battles, log the warn to the global modlog.