Updated server bin

Added PluginUpdater stuff.  Very alpha at the moment until we can test more thoroughly.
This commit is contained in:
Zack Piispanen 2013-05-18 23:53:28 -04:00
parent e37ada8749
commit 9ec77332fb
8 changed files with 276 additions and 1 deletions

View file

@ -24,6 +24,7 @@ using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using TShockAPI.PluginUpdater;
using Terraria;
using TShockAPI.DB;
using System.Reflection;
@ -160,6 +161,7 @@ namespace TShockAPI
add(Permissions.maintenance, Restart, "restart"); //Added restart command
add(Permissions.maintenance, OffNoSave, "off-nosave", "exit-nosave");
add(Permissions.maintenance, CheckUpdates, "checkupdates");
add(Permissions.updateplugins, UpdatePlugins, "updateplugins");
add(Permissions.causeevents, DropMeteor, "dropmeteor");
add(Permissions.causeevents, Star, "star");
add(Permissions.causeevents, Fullmoon, "fullmoon");
@ -1312,6 +1314,13 @@ namespace TShockAPI
ThreadPool.QueueUserWorkItem(UpdateManager.CheckUpdate);
}
private static void UpdatePlugins(CommandArgs args)
{
args.Player.SendInfoMessage("Starting plugin update process:");
args.Player.SendInfoMessage("This may take a while, do not turn off the server!");
new PluginUpdaterThread(args.Player);
}
#endregion Server Maintenence Commands
#region Cause Events and Spawn Monsters Commands