diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-07-11 13:45:16 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-07-11 13:45:16 +0100 |
commit | 89938d618307955ac1218b0f286bb1b1ce252e35 (patch) | |
tree | bbab43e037fb75a22c933e8cd80cbe685eff4065 /src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt | |
parent | a0f40b674eb8696e4145aefc960ae0e87173fcb1 (diff) | |
download | Chatting-89938d618307955ac1218b0f286bb1b1ce252e35.tar.gz Chatting-89938d618307955ac1218b0f286bb1b1ce252e35.tar.bz2 Chatting-89938d618307955ac1218b0f286bb1b1ce252e35.zip |
hippity hoppity oneconfig is my property
Diffstat (limited to 'src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt')
-rw-r--r-- | src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt index 91ea6b5..471eec8 100644 --- a/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt +++ b/src/main/kotlin/cc/woverflow/chatting/chat/ChatSpamBlock.kt @@ -37,7 +37,7 @@ object ChatSpamBlock { if (!ChattingConfig.customChatFormatting) { newMessage += rank } - newMessage += "$player${EnumChatFormatting.DARK_GRAY.toString()}: $content" + newMessage += "$player${EnumChatFormatting.DARK_GRAY}: $content" event.message = ChatComponentText(newMessage) } return @@ -67,7 +67,7 @@ object ChatSpamBlock { } if (message.replace(Regex("[\\w\\s]"), "").length > 2) { tokens.add("SPECIAL_CHARS") - } else if (message.replace(Regex("[\\w\\s]"), "").length > 0) { + } else if (message.replace(Regex("[\\w\\s]"), "").isNotEmpty()) { tokens.add("SPECIAL_CHAR") } else { tokens.add("LOW_SPECIAL_CHARS") |