Update ChatFilter.plugin.js

This commit is contained in:
Mirco Wittrien 2021-05-21 14:10:26 +02:00
parent 5a07455d69
commit 60658f0c9b
1 changed files with 0 additions and 5 deletions

View File

@ -459,7 +459,6 @@ module.exports = (_ => {
if (blocked) return {blocked, censored, content: blockedReplace, embeds: []};
else {
const checkCensor = string => {
console.log(string);
let singleCensored = false;
string = string.replace(/([\n\t\r])/g, " $1 ");
for (let cWord in words.censored) {
@ -468,7 +467,6 @@ module.exports = (_ => {
let newString = [];
if (words.censored[cWord].segment || words.censored[cWord].regex || cWord.indexOf(" ") > -1) {
if (this.testWord(string, reg)) {
console.log(reg);
singleCensored = true;
censored = true;
newString = [string.replace(reg, censoredReplace)];
@ -485,8 +483,6 @@ module.exports = (_ => {
}
string = newString.join(" ");
}
console.log(string);
console.log("____");
return {parsedContent: string.replace(/ ([\n\t\r]) /g, "$1"), singleCensored: singleCensored};
};
if (isContent) {
@ -503,7 +499,6 @@ module.exports = (_ => {
}
testWord (word, reg) {
console.log(word, reg);
let nativeEmoji = BDFDB.LibraryModules.EmojiUtils.translateSurrogatesToInlineEmoji(word);
if (nativeEmoji != word) return this.regTest(nativeEmoji, reg);
else {