From ade5b4b9b5b0a0bb5fa2e1fd98c1c4e80e2873ab Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Fri, 24 Feb 2023 02:15:21 +0000 Subject: [PATCH 1/2] Restrict the ability to make Refraction say things idk Signed-off-by: PandaNinjas --- src/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logs.ts b/src/logs.ts index baa21c7..a895694 100644 --- a/src/logs.ts +++ b/src/logs.ts @@ -14,7 +14,7 @@ type LogProvider = (text: string) => Promise; const javaAnalyzer: Analyzer = async (text) => { if (text.includes('This instance is not compatible with Java version')) { const xp = - /Please switch to one of the following Java versions for this instance:[\r\n]+([^\r\n]+)/g; + /Please switch to one of the following Java versions for this instance:[\r\n]+(Java version \d+)/g; let ver: string; const m = text.match(xp); From 38a136d742314a815464fc008ea2daa99f32a4ac Mon Sep 17 00:00:00 2001 From: PandaNinjas Date: Fri, 24 Feb 2023 02:18:19 +0000 Subject: [PATCH 2/2] Allow dots too Signed-off-by: PandaNinjas --- src/logs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logs.ts b/src/logs.ts index a895694..08c5c39 100644 --- a/src/logs.ts +++ b/src/logs.ts @@ -14,7 +14,7 @@ type LogProvider = (text: string) => Promise; const javaAnalyzer: Analyzer = async (text) => { if (text.includes('This instance is not compatible with Java version')) { const xp = - /Please switch to one of the following Java versions for this instance:[\r\n]+(Java version \d+)/g; + /Please switch to one of the following Java versions for this instance:[\r\n]+(Java version (?:\d|\.)+)/g; let ver: string; const m = text.match(xp);