From a10746d5ff5b642bfd065a4356ddb28173d480fe Mon Sep 17 00:00:00 2001 From: RaidMax Date: Wed, 19 Dec 2018 19:24:31 -0600 Subject: [PATCH] Fix small issue with log reading --- Application/Application.csproj | 4 +-- Application/IW4MServer.cs | 6 ++--- SharedLibraryCore/Services/ClientService.cs | 6 ++++- SharedLibraryCore/SharedLibraryCore.csproj | 27 ++++++++++--------- .../PenaltyListViewComponent.cs | 1 - 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Application/Application.csproj b/Application/Application.csproj index e31bb93b5..081d69a32 100644 --- a/Application/Application.csproj +++ b/Application/Application.csproj @@ -6,7 +6,7 @@ 2.1.5 false RaidMax.IW4MAdmin.Application - 2.2.2.3 + 2.2.2.4 RaidMax Forever None IW4MAdmin @@ -31,7 +31,7 @@ true true - 2.2.2.3 + 2.2.2.4 2.2.2.3 diff --git a/Application/IW4MServer.cs b/Application/IW4MServer.cs index 2874d2639..cd10be1ad 100644 --- a/Application/IW4MServer.cs +++ b/Application/IW4MServer.cs @@ -803,12 +803,10 @@ namespace IW4MAdmin if (!File.Exists(logPath)) { Logger.WriteError($"{logPath} {loc["SERVER_ERROR_DNE"]}"); -#if !DEBUG throw new ServerException($"{loc["SERVER_ERROR_LOG"]} {logPath}"); -#else - LogEvent = new GameLogEventDetection(this, logPath, logfile.Value); -#endif } + + LogEvent = new GameLogEventDetection(this, logPath, logfile.Value); } Logger.WriteInfo($"Log file is {logPath}"); diff --git a/SharedLibraryCore/Services/ClientService.cs b/SharedLibraryCore/Services/ClientService.cs index dada36872..e72bd65e1 100644 --- a/SharedLibraryCore/Services/ClientService.cs +++ b/SharedLibraryCore/Services/ClientService.cs @@ -106,6 +106,8 @@ namespace SharedLibraryCore.Services entity.AliasLink = aliasLink; await context.SaveChangesAsync(); + + entity.AliasLinkId = aliasLink.AliasLinkId; } // update the temporary alias to permanent one @@ -125,6 +127,8 @@ namespace SharedLibraryCore.Services existingAlias = alias; aliasLink = _aliasLink; await context.SaveChangesAsync(); + + entity.AliasLinkId = aliasLink.AliasLinkId; } // if no existing alias create new alias @@ -378,7 +382,7 @@ namespace SharedLibraryCore.Services int? ipAddress = identifier.ConvertToIP(); var iqLinkIds = (from alias in context.Aliases - where alias.IPAddress == ipAddress || + where (alias.IPAddress != null && alias.IPAddress == ipAddress) || alias.Name.ToLower().Contains(identifier) select alias.LinkId).Distinct(); diff --git a/SharedLibraryCore/SharedLibraryCore.csproj b/SharedLibraryCore/SharedLibraryCore.csproj index aa3d984bf..39c7d82fb 100644 --- a/SharedLibraryCore/SharedLibraryCore.csproj +++ b/SharedLibraryCore/SharedLibraryCore.csproj @@ -21,18 +21,21 @@ - - - - - - - - - - - - + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + + + + + diff --git a/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs b/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs index e0e539cce..f3a2b55ab 100644 --- a/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs +++ b/WebfrontCore/ViewComponents/PenaltyListViewComponent.cs @@ -46,7 +46,6 @@ namespace WebfrontCore.ViewComponents #else penaltiesDto = User.Identity.IsAuthenticated ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList(); #endif - return View("_List", penaltiesDto); } }