RatAttack: RATSIGNAL parsing fixed for landmarks with alternate name

This commit is contained in:
alterNERDtive 2021-04-05 15:50:51 +02:00
parent 2cda77edda
commit 9705bba899
2 changed files with 2 additions and 1 deletions

View file

@ -15,6 +15,7 @@
* Fixed RATSIGNAL parsing for “unknown system” (which contains a zero-width
space …)
* Fixed RATSIGNAL parsing for procedually generated landmark systems.
* Fixed RATSIGNAL parsing landmark systems with alternate names.
### Changed

View file

@ -20,7 +20,7 @@ namespace RatAttack
private static readonly Regex RatsignalRegex = new Regex(
// Yes. There is a zero-width space in “unknown system”. Probably
// just so it doesnt ping Mr. unknown in Fuelrats IRC m)
@"^RATSIGNAL - CMDR (?<cmdr>.+) - Reported System: (None|u\u200bnknown system|""(?<system>.+)""(\x0314)? \((?<systemInfo>([a-zA-Z0-9\s\(\)\-~]*([0-9,\.]+ LY (""[a-zA-Z\-]+"" of|from) [a-zA-Z0-9\s\*\-]+)?|Not found in galaxy database|Invalid system name))\)(\x03)?(?<permit> \x037\(((?<permitName>.*) )?Permit Required\)\x03)?) - Platform: \x03(6|3|12)(?<platform>(PC|Xbox|Playstation))\x03 - O2: (\x034)?(?<oxygen>(NOT )?OK)\x03? - Language: (?<language>[a-zA-z0-9\x7f-\xff\-\(\)\s]+)( - IRC Nick (?<nick>[a-zA-Z0-9_\[\]\-]+))? \(\x02Case #(?<number>\d+)\x02\) \((PC|XB|PS)_SIGNAL\)\v*$"
@"^RATSIGNAL - CMDR (?<cmdr>.+) - Reported System: (None|u\u200bnknown system|""(?<system>.+)""(\x0314)? \((?<systemInfo>([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))\)(\x03)?(?<permit> \x037\(((?<permitName>.*) )?Permit Required\)\x03)?) - Platform: \x03(6|3|12)(?<platform>(PC|Xbox|Playstation))\x03 - O2: (\x034)?(?<oxygen>(NOT )?OK)\x03? - Language: (?<language>[a-zA-z0-9\x7f-\xff\-\(\)\s]+)( - IRC Nick (?<nick>[a-zA-Z0-9_\[\]\-]+))? \(\x02Case #(?<number>\d+)\x02\) \((PC|XB|PS)_SIGNAL\)\v*$"
);
private static VoiceAttackLog Log