From cad4ba7b5bab6a03fba68479c6710ec1cdf1fdad Mon Sep 17 00:00:00 2001 From: axellse Date: Wed, 4 Sep 2024 18:05:44 +0200 Subject: [PATCH] move gameJoinLoadTime check --- Bloxstrap/Integrations/ActivityWatcher.cs | 30 +++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Bloxstrap/Integrations/ActivityWatcher.cs b/Bloxstrap/Integrations/ActivityWatcher.cs index b2544ba..cb329af 100644 --- a/Bloxstrap/Integrations/ActivityWatcher.cs +++ b/Bloxstrap/Integrations/ActivityWatcher.cs @@ -148,21 +148,6 @@ { // We are not in a game, nor are in the process of joining one - //gameJoinLoadTime is written to the log file regardless of the server being private or not - if (entry.Contains(GameJoinLoadTimeEntry)) - { - Match match = Regex.Match(entry, GameJoinLoadTimeEntryPattern); - - if (match.Groups.Count != 2) - { - App.Logger.WriteLine(LOG_IDENT, $"Failed to assert format for game join load time entry"); - App.Logger.WriteLine(LOG_IDENT, entry); - return; - } - - Data.UserId = match.Groups[1].Value; - } - if (entry.Contains(GameJoiningPrivateServerEntry)) { // we only expect to be joining a private server if we're not already in a game @@ -215,6 +200,21 @@ { // We are not confirmed to be in a game, but we are in the process of joining one + if (entry.Contains(GameJoinLoadTimeEntry)) + { + Match match = Regex.Match(entry, GameJoinLoadTimeEntryPattern); + + if (match.Groups.Count != 2) + { + App.Logger.WriteLine(LOG_IDENT, $"Failed to assert format for game join load time entry"); + App.Logger.WriteLine(LOG_IDENT, entry); + return; + } + + Data.UserId = match.Groups[1].Value; + App.Logger.WriteLine(LOG_IDENT, $"Got userid as " + Data.UserId); + } + if (entry.Contains(GameJoiningUniverseEntry)) { var match = Regex.Match(entry, GameJoiningUniversePattern);