Fix small issue with log reading

This commit is contained in:
RaidMax 2018-12-19 19:24:31 -06:00
parent 8dca05a442
commit a10746d5ff
5 changed files with 24 additions and 20 deletions

View File

@ -6,7 +6,7 @@
<RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion> <RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PackageId>RaidMax.IW4MAdmin.Application</PackageId> <PackageId>RaidMax.IW4MAdmin.Application</PackageId>
<Version>2.2.2.3</Version> <Version>2.2.2.4</Version>
<Authors>RaidMax</Authors> <Authors>RaidMax</Authors>
<Company>Forever None</Company> <Company>Forever None</Company>
<Product>IW4MAdmin</Product> <Product>IW4MAdmin</Product>
@ -31,7 +31,7 @@
<PropertyGroup> <PropertyGroup>
<ServerGarbageCollection>true</ServerGarbageCollection> <ServerGarbageCollection>true</ServerGarbageCollection>
<TieredCompilation>true</TieredCompilation> <TieredCompilation>true</TieredCompilation>
<AssemblyVersion>2.2.2.3</AssemblyVersion> <AssemblyVersion>2.2.2.4</AssemblyVersion>
<FileVersion>2.2.2.3</FileVersion> <FileVersion>2.2.2.3</FileVersion>
</PropertyGroup> </PropertyGroup>

View File

@ -803,12 +803,10 @@ namespace IW4MAdmin
if (!File.Exists(logPath)) if (!File.Exists(logPath))
{ {
Logger.WriteError($"{logPath} {loc["SERVER_ERROR_DNE"]}"); Logger.WriteError($"{logPath} {loc["SERVER_ERROR_DNE"]}");
#if !DEBUG
throw new ServerException($"{loc["SERVER_ERROR_LOG"]} {logPath}"); 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}"); Logger.WriteInfo($"Log file is {logPath}");

View File

@ -106,6 +106,8 @@ namespace SharedLibraryCore.Services
entity.AliasLink = aliasLink; entity.AliasLink = aliasLink;
await context.SaveChangesAsync(); await context.SaveChangesAsync();
entity.AliasLinkId = aliasLink.AliasLinkId;
} }
// update the temporary alias to permanent one // update the temporary alias to permanent one
@ -125,6 +127,8 @@ namespace SharedLibraryCore.Services
existingAlias = alias; existingAlias = alias;
aliasLink = _aliasLink; aliasLink = _aliasLink;
await context.SaveChangesAsync(); await context.SaveChangesAsync();
entity.AliasLinkId = aliasLink.AliasLinkId;
} }
// if no existing alias create new alias // if no existing alias create new alias
@ -378,7 +382,7 @@ namespace SharedLibraryCore.Services
int? ipAddress = identifier.ConvertToIP(); int? ipAddress = identifier.ConvertToIP();
var iqLinkIds = (from alias in context.Aliases var iqLinkIds = (from alias in context.Aliases
where alias.IPAddress == ipAddress || where (alias.IPAddress != null && alias.IPAddress == ipAddress) ||
alias.Name.ToLower().Contains(identifier) alias.Name.ToLower().Contains(identifier)
select alias.LinkId).Distinct(); select alias.LinkId).Distinct();

View File

@ -21,18 +21,21 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Jint" Version="2.11.58" /> <PackageReference Include="Jint" Version="2.11.58" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.0">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" /> <PrivateAssets>all</PrivateAssets>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" /> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PackageReference Include="Microsoft.Extensions.Localization" Version="2.1.1" /> </PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> <PackageReference Include="Microsoft.Extensions.Localization" Version="2.2.0" />
<PackageReference Include="Npgsql" Version="4.0.3" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="2.2.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.2" /> <PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Npgsql" Version="4.0.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.2.0" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" />
<PackageReference Include="SimpleCrypto.NetCore" Version="1.0.0" /> <PackageReference Include="SimpleCrypto.NetCore" Version="1.0.0" />
</ItemGroup> </ItemGroup>

View File

@ -46,7 +46,6 @@ namespace WebfrontCore.ViewComponents
#else #else
penaltiesDto = User.Identity.IsAuthenticated ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList(); penaltiesDto = User.Identity.IsAuthenticated ? penaltiesDto.ToList() : penaltiesDto.Where(p => !p.Sensitive).ToList();
#endif #endif
return View("_List", penaltiesDto); return View("_List", penaltiesDto);
} }
} }