RatAttack: correctly handles "" system now

Still not sure if a completely empty system (happens on manual RATSIGNAL) is intentional; but I’m handling it gracefully now, defaulting to “None”.
This commit is contained in:
alterNERDtive 2021-05-19 09:53:31 +02:00
parent b30074317f
commit 1991e6b5f6
2 changed files with 7 additions and 0 deletions

View file

@ -5,6 +5,8 @@
### Fixed
* Added handling for Odyssey clients. (#114)
* Correctly setting system for manual Ratsignals (`""`) to `None` now. IMO a
Mecha bug, but whatever.
-----

View file

@ -103,6 +103,11 @@ namespace RatAttack
int number = int.Parse(match.Groups["number"].Value);
if (String.IsNullOrEmpty(system))
{
system = "None";
}
Log.Debug($"New rat case: CMDR “{cmdr}” in “{system}”{(systemInfo != null ? $" ({systemInfo})" : "")} on {platform}{(odyssey ? " (Odyssey)" : "")}, permit locked: {permitLocked}{(permitLocked && permitName != null ? $" (permit name: {permitName})" : "")}, code red: {codeRed} (#{number}).");
CaseList[number] = new RatCase(cmdr, language, system, systemInfo, permitLocked, permitName, platform, odyssey, codeRed, number);