mirror of
https://github.com/computernewb/collabvm-1.2.ts.git
synced 2025-01-22 10:42:00 -05:00
fix registered users' ability to bypass automute
ditto... oops.
This commit is contained in:
parent
223ff614d1
commit
28dddfc363
1 changed files with 10 additions and 2 deletions
12
src/User.ts
12
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;
|
||||
|
|
Loading…
Reference in a new issue