Added console command "autosave" which toggles autosaving

This commit is contained in:
high 2011-06-25 00:46:24 -04:00
parent f501212dfe
commit ed0ad7e751

View file

@ -368,6 +368,12 @@ namespace TShockAPI
{
Log.Info(string.Format("Server said: {0}", text.Remove(0, 4)));
}
else if (text == "autosave")
{
Main.autoSave = ConfigurationManager.AutoSave = !ConfigurationManager.AutoSave;
Log.ConsoleInfo("AutoSave " + (ConfigurationManager.AutoSave ? "Enabled" : "Disabled"));
e.Handled = true;
}
else if (text.StartsWith("/"))
{
if (Commands.HandleCommand(TSPlayer.Server, text))