Merge remote-tracking branch 'upstream/general-devel' into regions

This commit is contained in:
Ivan 2018-04-29 18:39:12 +02:00
commit 44dfc570ab
9 changed files with 20 additions and 362 deletions

View file

@ -116,8 +116,6 @@ namespace TShockAPI
public static RestManager RestManager;
/// <summary>Utils - Static reference to the utilities class, which contains a variety of utility functions.</summary>
public static Utils Utils = Utils.Instance;
/// <summary>StatTracker - Static reference to the stat tracker, which sends some server metrics every 5 minutes.</summary>
public static StatTracker StatTracker = new StatTracker();
/// <summary>UpdateManager - Static reference to the update checker, which checks for updates and notifies server admins of updates.</summary>
public static UpdateManager UpdateManager;
/// <summary>Log - Static reference to the log system, which outputs to either SQL or a text file, depending on user config.</summary>
@ -334,12 +332,6 @@ namespace TShockAPI
Log.ConsoleInfo("TShock {0} ({1}) now running.", Version, VersionCodename);
var systemRam = StatTracker.GetFreeSystemRam(ServerApi.RunningMono);
if (systemRam > -1 && systemRam < 2048)
{
Log.ConsoleError("This machine has less than 2 gigabytes of RAM free. Be advised that it might not be enough to run TShock.");
}
ServerApi.Hooks.GamePostInitialize.Register(this, OnPostInit);
ServerApi.Hooks.GameUpdate.Register(this, OnUpdate);
ServerApi.Hooks.GameHardmodeTileUpdate.Register(this, OnHardUpdate);
@ -763,13 +755,11 @@ namespace TShockAPI
}
})
.AddFlag("--provider-token", (token) => StatTracker.ProviderToken = token)
//Flags without arguments
.AddFlag("-logclear", () => LogClear = true)
.AddFlag("-autoshutdown", () => Main.instance.EnableAutoShutdown())
.AddFlag("-dump", () => Utils.Dump())
.AddFlag("--stats-optout", () => StatTracker.OptOut = true);
.AddFlag("-dump", () => Utils.Dump());
CliParser.ParseFromSource(parms);
}
@ -902,7 +892,6 @@ namespace TShockAPI
}
UpdateManager = new UpdateManager();
StatTracker.Start();
}
/// <summary>LastCheck - Used to keep track of the last check for basically all time based checks.</summary>