fix registered users' ability to bypass automute

ditto... oops.
This commit is contained in:
modeco80 2024-04-22 08:40:25 -04:00
parent 223ff614d1
commit 28dddfc363

View file

@ -85,8 +85,16 @@ export class User {
} }
onMsgSent() { onMsgSent() {
if (!this.Config.collabvm.automute.enabled) return; if (!this.Config.collabvm.automute.enabled) return;
if (this.rank !== 0) return; // 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(); this.ChatRateLimit.request();
break;
}
} }
mute(permanent : boolean) { mute(permanent : boolean) {
this.IP.muted = true; this.IP.muted = true;