Update to latest TSAPI. Changed update manager to use same code as stat tracker, which hopefully doesnt break on mono. Also changed it to not check every update to see if time has passed. Made packetbufferer async for windows and if specified for mono. Fixed maxspawns error message to explain range. Ticked version.
This commit is contained in:
parent
1421c23df7
commit
444af6cf57
8 changed files with 83 additions and 52 deletions
|
|
@ -1541,7 +1541,15 @@ namespace TShockAPI
|
|||
private static void CheckUpdates(CommandArgs args)
|
||||
{
|
||||
args.Player.SendInfoMessage("An update check has been queued.");
|
||||
ThreadPool.QueueUserWorkItem(UpdateManager.CheckUpdate);
|
||||
try
|
||||
{
|
||||
TShock.UpdateManager.UpdateCheck(null);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//swallow the exception
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdatePlugins(CommandArgs args)
|
||||
|
|
@ -3363,7 +3371,7 @@ namespace TShockAPI
|
|||
int maxSpawns = -1;
|
||||
if (!int.TryParse(args.Parameters[0], out maxSpawns) || maxSpawns < 0 || maxSpawns > Main.maxNPCs)
|
||||
{
|
||||
args.Player.SendWarningMessage("Invalid maximum spawns!");
|
||||
args.Player.SendWarningMessage("Invalid maximum spawns! Acceptable range is {0} to {1}", 0, Main.maxNPCs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue