From fefe3fd23caa01fe58cc8705292f67edf80e5270 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sun, 15 May 2022 15:46:29 +0700 Subject: Revert "allow to disable the spam blocker" This reverts commit 8ccf84e85e0bb4b4cb79e889037a01cfde1a7525. --- .../kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt | 1 - .../cc/woverflow/chatting/config/ChattingConfig.kt | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'src') diff --git a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt index 7130880..224e614 100644 --- a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt +++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt @@ -25,7 +25,6 @@ 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() diff --git a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt index 3bcad9d..bc3aa31 100644 --- a/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt +++ b/src/main/kotlin/cc/woverflow/chatting/config/ChattingConfig.kt @@ -83,26 +83,10 @@ object ChattingConfig : min = 0, max = 100, name = "Spam Threshold", - description = "If Chatting detects a player message seems like spam, and the probability is above this threshold, it will hide it.\nMade for Hypixel Skyblock, and doesn't work if chat messages have extra prefixes. Set to 100 to disable.", + description = "If Chatting detects a player message seems like spam, and the probability is above this threshold, it will hide it. Set to 0 to disable.", category = "Player Spam Blocker" ) var spamThreshold = 95 - get() { - val isOnHypixel = EssentialAPI.getMinecraftUtil().isHypixel() - return if (!isOnHypixel && hypixelOnlySpamBlocker) { - 100 - } else { - field - } - } - - @Property( - type = PropertyType.SWITCH, - name = "Enable Spam Blocker only on Hypixel", - description = "Disable all player-based message tweaks outside of Hypixel.", - category = "Player Spam Blocker" - ) - var hypixelOnlySpamBlocker = true @Property( type = PropertyType.SWITCH, -- cgit