From 12e4087f261b88c3610c687efbf507654f308c47 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:06:15 +0700 Subject: [PATCH] or maybe another fixies idk --- .../java/me/chayapak1/chomens_bot/commands/GrepLogCommand.java | 1 + .../java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/commands/GrepLogCommand.java b/src/main/java/me/chayapak1/chomens_bot/commands/GrepLogCommand.java index 4dfc3f1..f8b5e08 100644 --- a/src/main/java/me/chayapak1/chomens_bot/commands/GrepLogCommand.java +++ b/src/main/java/me/chayapak1/chomens_bot/commands/GrepLogCommand.java @@ -52,6 +52,7 @@ public class GrepLogCommand extends Command { if (thread == null) throw new CommandException(Component.text("There is no query process running")); bot.grepLog.running = false; + bot.grepLog.pattern = null; thread.interrupt(); // ? should i interrupt it this way? diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java index fa8857b..1db535c 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java @@ -28,7 +28,7 @@ import java.util.zip.GZIPInputStream; public class GrepLogPlugin { private final Bot bot; - private Pattern pattern; + public Pattern pattern; private int count = 0;