From 8ccf84e85e0bb4b4cb79e889037a01cfde1a7525 Mon Sep 17 00:00:00 2001 From: Kendell R Date: Fri, 13 May 2022 06:18:11 -0700 Subject: allow to disable the spam blocker --- src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/kotlin/cc/woverflow/chatting/chat') diff --git a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt index 224e614..7130880 100644 --- a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt +++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt @@ -25,6 +25,7 @@ object ChatSpamBlock { val tokens = tokenize(content) val spamProb = findSpamProbability(tokens) println("\n[CHATTING]$message") + if (ChattingConfig.spamThreshold == 100) return if (spamProb * 100 > ChattingConfig.spamThreshold) { if (ChattingConfig.showSpamInGray) { var newMessage = EnumChatFormatting.DARK_GRAY.toString() + EnumChatFormatting.STRIKETHROUGH.toString() -- cgit