This commit is contained in:
Bitl 2019-10-19 13:02:01 -07:00
parent 87a6262a3c
commit 9209adbba9
2 changed files with 12 additions and 7 deletions

View File

@ -218,18 +218,18 @@ namespace NovetusCMD
if (CommandLine["no3d"] != null) if (CommandLine["no3d"] != null)
{ {
StartInNo3D = true; StartInNo3D = true;
ConsolePrint("NovetusCMD will now launch the server in No3D mode.\n", 4); ConsolePrint("NovetusCMD will now launch the server in No3D mode.", 4);
} }
if (CommandLine["overrideconfig"] != null) if (CommandLine["overrideconfig"] != null)
{ {
OverrideINI = true; OverrideINI = true;
ConsolePrint("NovetusCMD will no longer grab values from the INI file.\n", 4); ConsolePrint("NovetusCMD will no longer grab values from the INI file.", 4);
if (CommandLine["upnp"] != null) if (CommandLine["upnp"] != null)
{ {
GlobalVars.UPnP = true; GlobalVars.UPnP = true;
ConsolePrint("NovetusCMD will now use UPnP for port forwarding.\n", 4); ConsolePrint("NovetusCMD will now use UPnP for port forwarding.", 4);
} }
if (CommandLine["map"] != null) if (CommandLine["map"] != null)
@ -261,12 +261,12 @@ namespace NovetusCMD
GlobalVars.SelectedClient = GlobalVars.DefaultClient; GlobalVars.SelectedClient = GlobalVars.DefaultClient;
GlobalVars.Map = GlobalVars.DefaultMap; GlobalVars.Map = GlobalVars.DefaultMap;
Console.Title = "Novetus " + version + " CMD"; Console.Title = "Novetus " + version + " CMD";
GlobalVars.Version = version; ConsolePrint("NovetusCMD version " + version + " loaded. Initializing config.", 1);
GlobalVars.Version = version;
if (!OverrideINI) if (!OverrideINI)
{ {
ConsolePrint("NovetusCMD is now loading all server configurations from the INI file.", 5); ConsolePrint("NovetusCMD is now loading all server configurations from the INI file.", 5);
ConsolePrint("NovetusCMD version " + version + " loaded. Initializing config.", 4);
if (!File.Exists(GlobalVars.ConfigDir + "\\config.ini")) if (!File.Exists(GlobalVars.ConfigDir + "\\config.ini"))
{ {
@ -276,13 +276,18 @@ namespace NovetusCMD
ReadConfigValues(); ReadConfigValues();
} }
else
{
ReadClientValues(GlobalVars.SelectedClient);
}
InitUPnP(); InitUPnP();
StartWebServer(); StartWebServer();
AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose); AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose);
StartServer(StartInNo3D); ConsolePrint("Launching a " + GlobalVars.SelectedClient + " server on " + GlobalVars.Map + " with " + GlobalVars.PlayerLimit + " players.", 1);
StartServer(StartInNo3D);
Console.ReadKey(); Console.ReadKey();
} }