From 28dddfc363f05da74036f2b6f8cbe73333f2f30e Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 22 Apr 2024 08:40:25 -0400 Subject: [PATCH] fix registered users' ability to bypass automute ditto... oops. --- src/User.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/User.ts b/src/User.ts index 3741088..85acb8c 100644 --- a/src/User.ts +++ b/src/User.ts @@ -85,8 +85,16 @@ export class User { } onMsgSent() { if (!this.Config.collabvm.automute.enabled) return; - if (this.rank !== 0) return; - this.ChatRateLimit.request(); + // rate limit guest and unregistered chat messages, but not staff ones + switch(this.rank) { + case Rank.Moderator: + case Rank.Admin: + break; + + default: + this.ChatRateLimit.request(); + break; + } } mute(permanent : boolean) { this.IP.muted = true;