From f036283a60fa52e0c14c9c25998366c71b4fa9bf Mon Sep 17 00:00:00 2001 From: Mia <49593536+mia-pi-git@users.noreply.github.com> Date: Wed, 19 May 2021 09:21:05 -0500 Subject: [PATCH] Rooms: Actually ensure bots don't count for automodchat --- server/rooms.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/rooms.ts b/server/rooms.ts index 318aa3824f..eda9e07516 100644 --- a/server/rooms.ts +++ b/server/rooms.ts @@ -1026,7 +1026,7 @@ export abstract class BasicRoom { runAutoModchat() { if (!this.settings.autoModchat || this.settings.autoModchat.active) return; // they are staff and online - const staff = Object.values(this.users).filter(u => u.can('mute', null, this)); + const staff = Object.values(this.users).filter(u => this.auth.atLeast(u, '%')); if (!staff.length) { const {rank, time} = this.settings.autoModchat; this.modchatTimer = setTimeout(() => { @@ -1045,7 +1045,7 @@ export abstract class BasicRoom { } checkAutoModchat(user: User) { - if (user.can('mute', null, this)) { + if (this.auth.atLeast(user, '%')) { if (this.modchatTimer) { clearTimeout(this.modchatTimer); }