Fixes for PR 2.3.4.0

This commit is contained in:
RaidMax 2019-01-27 19:45:35 -06:00
parent 07df6dbf79
commit 760d3026ce
6 changed files with 16 additions and 23 deletions

View File

@ -215,13 +215,7 @@ namespace IW4MAdmin.Application
Running = true;
#region CONFIG
ApplicationConfiguration config = null;
try
{
config = ConfigHandler.Configuration();
}
catch { }
var config = ConfigHandler.Configuration();
// copy over default config if it doesn't exist
if (config == null)

View File

@ -1,16 +1,11 @@
using System;
using System.Threading.Tasks;
using System.IO;
using System.Reflection;
using IW4MAdmin.Application.Migration;
using SharedLibraryCore;
using SharedLibraryCore.Objects;
using SharedLibraryCore.Database;
using SharedLibraryCore.Localization;
using System;
using System.IO;
using System.Text;
using System.Threading;
using SharedLibraryCore.Localization;
using IW4MAdmin.Application.Migration;
using SharedLibraryCore.Exceptions;
using System.Threading.Tasks;
namespace IW4MAdmin.Application
{
@ -39,15 +34,17 @@ namespace IW4MAdmin.Application
try
{
ServerManager = ApplicationManager.GetInstance();
try
if (ServerManager.GetApplicationSettings().Configuration() != null)
{
Localization.Configure.Initialize(ServerManager.GetApplicationSettings().Configuration().CustomLocale);
}
catch (ServerException)
else
{
Localization.Configure.Initialize();
}
loc = Utilities.CurrentLocalization.LocalizationIndex;
Console.CancelKeyPress += new ConsoleCancelEventHandler(OnCancelKey);
@ -124,7 +121,9 @@ namespace IW4MAdmin.Application
userInput = Console.ReadLine();
if (userInput?.ToLower() == "quit")
{
ServerManager.Stop();
}
if (ServerManager.Servers.Count == 0)
{

View File

@ -1,7 +1,7 @@
dotnet publish WebfrontCore/WebfrontCore.csproj -c Prerelease -o X:\IW4MAdmin\Publish\WindowsPrerelease /p:PublishProfile=Prerelease
dotnet publish Application/Application.csproj -c Prerelease -o X:\IW4MAdmin\Publish\WindowsPrerelease /p:PublishProfile=Prerelease
dotnet publish GameLogServer/GameLogServer.pyproj -c Release -o X:\IW4MAdmin\Publish\WindowsPrerelease\GameLogServer
dotnet publish GameLogServer/DiscordWebhook.pyproj -c Release -o X:\IW4MAdmin\Publish\WindowsPrerelease\DiscordWebhook
::dotnet publish GameLogServer/DiscordWebhook.pyproj -c Release -o X:\IW4MAdmin\Publish\WindowsPrerelease\DiscordWebhook
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild GameLogServer/GameLogServer.pyproj /p:PublishProfile=PreRelease /p:DeployOnBuild=true /p:PublishProfileRootFolder=X:\IW4MAdmin\GameLogServer\
msbuild DiscordWebhook/DiscordWebhook.pyproj /p:PublishProfile=PreRelease /p:DeployOnBuild=true /p:PublishProfileRootFolder=X:\IW4MAdmin\DiscordWebhook\

View File

@ -41,7 +41,7 @@ namespace SharedLibraryCore.Configuration
return File.WriteAllTextAsync(Path.Join(Utilities.OperatingDirectory, "Configuration", $"{Filename}.json"), appConfigJSON);
}
public T Configuration() => _configuration == null ? throw new ServerException("Configuration is null") : _configuration;
public T Configuration() => _configuration;
public void Set(T config)
{

View File

@ -157,12 +157,11 @@
<script type="text/javascript" src="~/lib/moment/moment.js"></script>
<script type="text/javascript" src="~/lib/moment-timezone/builds/moment-timezone-with-data.js"></script>
<script type="text/javascript" src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js"></script>
<script type="text/javascript" src="~/lib/canvasjs/canvasjs.js"></script>
<script type="text/javascript" src="~/js/action.js"></script>
<script type="text/javascript" src="~/js/search.js"></script>
</environment>
<environment include="Production">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/canvasjs/1.7.0/canvasjs.min.js"></script>
<script type="text/javascript" src="~/js/global.min.js"></script>
</environment>
@RenderSection("scripts", required: false)

View File

@ -17,6 +17,7 @@
"wwwroot/lib/bootstrap/dist/js/bootstrap.min.js",
"wwwroot/lib/moment/min/moment.min.js",
"wwwroot/lib/moment-timezone/builds/moment-timezone.min.js",
"wwwroot/lib/canvasjs/canvasjs.js",
"wwwroot/js/action.js",
"wwwroot/js/console.js",
"wwwroot/js/penalty.js",