aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/cc/woverflow/chatting/chat
diff options
context:
space:
mode:
authorKendell R <KTibow@users.noreply.github.com>2022-05-13 06:18:11 -0700
committerKendell R <KTibow@users.noreply.github.com>2022-05-13 06:18:23 -0700
commit8ccf84e85e0bb4b4cb79e889037a01cfde1a7525 (patch)
treeb3de2e4c524668ee05d93709139cba570c4f602e /src/main/kotlin/cc/woverflow/chatting/chat
parent5abc943439c1439a98ca06feb6d740cb3c1fa159 (diff)
downloadChatting-8ccf84e85e0bb4b4cb79e889037a01cfde1a7525.tar.gz
Chatting-8ccf84e85e0bb4b4cb79e889037a01cfde1a7525.tar.bz2
Chatting-8ccf84e85e0bb4b4cb79e889037a01cfde1a7525.zip
allow to disable the spam blocker
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/chat')
-rw-r--r--src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt1
1 files changed, 1 insertions, 0 deletions
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()