From 0429407547e1d5e6b1f79d38d34399854b92498a Mon Sep 17 00:00:00 2001 From: nikky Date: Thu, 24 May 2018 20:07:32 +0200 Subject: [PATCH] actually stripping colors attempt 2 --- core/src/main/kotlin/matterlink/handlers/ServerChatHandler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/kotlin/matterlink/handlers/ServerChatHandler.kt b/core/src/main/kotlin/matterlink/handlers/ServerChatHandler.kt index 43942ed..7fe504a 100644 --- a/core/src/main/kotlin/matterlink/handlers/ServerChatHandler.kt +++ b/core/src/main/kotlin/matterlink/handlers/ServerChatHandler.kt @@ -19,12 +19,13 @@ object ServerChatHandler { if (nextMessage?.gateway == cfg.connect.gateway) { if (!nextMessage.text.isBlank()) { + nextMessage.text = nextMessage.text.stripColorIn val message = when (nextMessage.event) { "user_action" -> nextMessage.format(cfg.incoming.action) "" -> { // try to handle command and do not handle as a chat message if (BridgeCommandRegistry.handleCommand(nextMessage)) return - nextMessage.format(cfg.incoming.chat.stripColorIn) + nextMessage.format(cfg.incoming.chat) } "join_leave" -> nextMessage.format(cfg.incoming.joinPart) else -> {