fix wordlist

This commit is contained in:
Elijah R 2024-07-14 23:15:48 -04:00
parent cb0752b9c7
commit 71fee66673

View file

@ -156,7 +156,7 @@ export class Client extends EventEmitter {
return;
}
if (talkMsg.data.msg.length > this.room.config.charlimit) return;
if (this.room.config.bannedWords.some((w) => talkMsg.data.msg.indexOf(w) !== -1)) {
if (this.room.config.bannedWords.some((w) => talkMsg.data.msg.toLowerCase().indexOf(w.toLowerCase()) !== -1)) {
return;
}
this.emit('talk', talkMsg.data.msg);