diff --git a/TShockAPI/BackupManager.cs b/TShockAPI/BackupManager.cs
index 1bff999e..180f2322 100644
--- a/TShockAPI/BackupManager.cs
+++ b/TShockAPI/BackupManager.cs
@@ -70,14 +70,18 @@ namespace TShockAPI
Tools.Broadcast("Server map saving, potential lag spike");
WorldGen.saveWorld();
+ Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("World backed up");
+ Console.ForegroundColor = ConsoleColor.Gray;
Log.Info(string.Format("World backed up ({0})", Main.worldPathName));
Main.worldPathName = worldname;
}
catch (Exception ex)
{
+ Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Backup failed");
+ Console.ForegroundColor = ConsoleColor.Gray;
Log.Error("Backup failed");
Log.Error(ex.ToString());
}
diff --git a/TShockAPI/Log.cs b/TShockAPI/Log.cs
index 1258c874..6e158927 100644
--- a/TShockAPI/Log.cs
+++ b/TShockAPI/Log.cs
@@ -86,7 +86,9 @@ namespace TShockAPI
/// The message to be written.
public static void ConsoleError(String message)
{
+ Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(message);
+ Console.ForegroundColor = ConsoleColor.Gray;
Write(message, LogLevel.Error);
}
@@ -114,7 +116,9 @@ namespace TShockAPI
/// The message to be written.
public static void ConsoleInfo(String message)
{
+ Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine(message);
+ Console.ForegroundColor = ConsoleColor.Gray;
Write(message, LogLevel.Info);
}
diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs
index 2756486f..a3384dd1 100644
--- a/TShockAPI/TSPlayer.cs
+++ b/TShockAPI/TSPlayer.cs
@@ -280,7 +280,9 @@ namespace TShockAPI
public override void SendMessage(string msg, byte red, byte green, byte blue)
{
+ Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine(msg);
+ Console.ForegroundColor = ConsoleColor.Gray;
}
public void SetBloodMoon(bool bloodMoon)
diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs
index 3f9b3c6c..73914e8c 100755
--- a/TShockAPI/TShock.cs
+++ b/TShockAPI/TShock.cs
@@ -45,6 +45,7 @@ namespace TShockAPI
public static TSPlayer[] Players = new TSPlayer[Main.maxPlayers];
public static BanManager Bans;
public static WarpManager Warps;
+ public static RegionManager Regions;
public static BackupManager Backups;
public static ConfigFile Config { get; set; }
@@ -112,6 +113,7 @@ namespace TShockAPI
Bans = new BanManager(DB);
Warps = new WarpManager(DB);
+ Regions = new RegionManager(DB);
Log.ConsoleInfo(string.Format("TShock Version {0} ({1}) now running.", Version, VersionCodename));
@@ -128,7 +130,6 @@ namespace TShockAPI
GetDataHandlers.InitGetDataHandler();
Commands.InitCommands();
- RegionManager.ReadAllSettings();
ItemManager.LoadBans();
Log.ConsoleInfo("AutoSave " + (TShock.Config.AutoSave ? "Enabled" : "Disabled"));
@@ -209,8 +210,10 @@ namespace TShockAPI
{
var r = new Random((int)DateTime.Now.ToBinary());
AuthToken = r.Next(100000, 10000000);
+ Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("TShock Notice: To become SuperAdmin, join the game and type /auth " + AuthToken);
Console.WriteLine("This token will only display ONCE. This only works ONCE. If you don't use it and the server goes down, delete auth.lck.");
+ Console.ForegroundColor = ConsoleColor.Gray;
FileTools.CreateFile(Path.Combine(SavePath, "auth.lck"));
}
}