From 75599522fd4cabe1d4c4862f6b0d2e8a8d7df8a8 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sun, 8 Oct 2023 21:13:23 +0700 Subject: [PATCH] slkeep --- .../land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java index 959ca75..e9e48d4 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/ChatPlugin.java @@ -30,7 +30,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; public class ChatPlugin extends Bot.Listener { - public static final Pattern CHAT_SPLIT_PATTERN = Pattern.compile("\\G\\s*([^\\r\\n]{1,254}(?=\\s|$)|[^\\r\\n]{254})"); // thanks HBot for the regex <3 + public final Pattern CHAT_SPLIT_PATTERN; public static final Pattern COLOR_CODE_PATTERN = Pattern.compile("(&[a-f0-9rlonmk])", Pattern.MULTILINE); public static final Pattern COLOR_CODE_END_PATTERN = Pattern.compile("^.*&[a-f0-9rlonmk]$", Pattern.MULTILINE); @@ -46,6 +46,7 @@ public class ChatPlugin extends Bot.Listener { public ChatPlugin (Bot bot) { this.bot = bot; + this.CHAT_SPLIT_PATTERN = Pattern.compile("\\G\\s*([^\\r\\n]{1," + (bot.options.creayun ? 126 : 254) + "}(?=\\s|$)|[^\\r\\n]{254})"); // thanks HBot for the regex <3 queueDelay = bot.options.chatQueueDelay;