From 2715fa2a48af22b3c34e676ff285fdde87311158 Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Fri, 18 Jun 2021 11:37:05 +0200 Subject: [PATCH] RatAttack: fixed RATSIGNAL parsing for system information containing `/` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e.g. “Herbig AE/BE star” --- CHANGELOG.md | 2 ++ plugins/RatAttack/RatAttack.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb5da5..8590cb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * No longer trying to get nearest CMDR for the new “Unconfirmed” system info. * Fixed RATSIGNAL parsing for locales containing `&`. +* Fixed RATSIGNAL parsing for system information containing `/` (e.g. “Herbig + AE/BE star”). ## SpanshAttack 7.2.1 diff --git a/plugins/RatAttack/RatAttack.cs b/plugins/RatAttack/RatAttack.cs index 2778941..d24597a 100644 --- a/plugins/RatAttack/RatAttack.cs +++ b/plugins/RatAttack/RatAttack.cs @@ -18,7 +18,7 @@ namespace RatAttack private static alterNERDtive.util.PipeServer? ratsignalPipe; private static readonly Regex RatsignalRegex = new Regex( - @"^RATSIGNAL Case #(?\d+) (?(PC|Xbox|Playstation))(? \(Code Red\))?(? \(Odyssey\))? – CMDR (?.+) – System: (None|u\u200bnknown system|""(?.+)"" \((?([a-zA-Z0-9\s\(\)\-~]*([0-9,\.]+ LY (""[a-zA-Z\-]+"" of|from) [a-zA-Z0-9\s\*\-]+)?( \([a-zA-Z\s]+\))?|Not found in galaxy database|Invalid system name))\)(? \(((?.*) )?Permit Required\))?) – Language: (?[a-zA-z0-9\x7f-\xff\-\(\)&\s]+)( – Nick: (?[a-zA-Z0-9_\[\]\-]+))? \((PC|XB|PS)_SIGNAL\)\v*$" + @"^RATSIGNAL Case #(?\d+) (?(PC|Xbox|Playstation))(? \(Code Red\))?(? \(Odyssey\))? – CMDR (?.+) – System: (None|u\u200bnknown system|""(?.+)"" \((?([a-zA-Z0-9\s\(\)\-/]*(~?[0-9,\.]+ LY (""[a-zA-Z\-]+"" of|from) [a-zA-Z0-9\s\*\-]+)?( \([a-zA-Z\s]+\))?|Not found in galaxy database|Invalid system name))\)(? \(((?.*) )?Permit Required\))?) – Language: (?[a-zA-z0-9\x7f-\xff\-\(\)&\s]+)( – Nick: (?[a-zA-Z0-9_\[\]\-]+))? \((PC|XB|PS)_SIGNAL\)\v*$" ); private static VoiceAttackLog Log