From 94c26f0ee214a47465c98f4706a1530ab7ab9486 Mon Sep 17 00:00:00 2001 From: HF Date: Mon, 25 May 2020 14:46:06 +0200 Subject: [PATCH] ban cyrillic from en again --- src/core/ChatProvider.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/ChatProvider.js b/src/core/ChatProvider.js index f24ce29..7bb5dd0 100644 --- a/src/core/ChatProvider.js +++ b/src/core/ChatProvider.js @@ -21,6 +21,7 @@ export class ChatProvider { this.history.push([]); } this.caseCheck = /^[A-Z !.]*$/; + this.cyrillic = new RegExp('[\u0436-\u043B]'); this.filters = [ { regexp: /ADMIN/gi, @@ -145,6 +146,10 @@ export class ChatProvider { } } + if (message.match(this.cyrillic) && channelId === 0) { + return 'Please use int channel'; + } + if (this.mutedCountries.includes(country)) { return 'Your country is temporary muted from chat'; }