diff --git a/TGCommandLine/BYONDCommands.cs b/TGCommandLine/BYONDCommands.cs index e30350be19..1a0e9aa27d 100644 --- a/TGCommandLine/BYONDCommands.cs +++ b/TGCommandLine/BYONDCommands.cs @@ -32,7 +32,7 @@ namespace TGCommandLine type = TGByondVersion.Staged; else if (parameters[0].ToLower() == "--latest") type = TGByondVersion.Latest; - Console.WriteLine(Server.GetComponent().GetVersion(type) ?? "Unistalled"); + OutputProc(Server.GetComponent().GetVersion(type) ?? "Unistalled"); return ExitCode.Normal; } public override string GetArgumentString() @@ -58,25 +58,25 @@ namespace TGCommandLine switch (Server.GetComponent().CurrentStatus()) { case TGByondStatus.Downloading: - Console.WriteLine("Downloading update..."); + OutputProc("Downloading update..."); break; case TGByondStatus.Idle: - Console.WriteLine("Updater Idle"); + OutputProc("Updater Idle"); break; case TGByondStatus.Staged: - Console.WriteLine("Update staged and awaiting server restart"); + OutputProc("Update staged and awaiting server restart"); break; case TGByondStatus.Staging: - Console.WriteLine("Staging update..."); + OutputProc("Staging update..."); break; case TGByondStatus.Starting: - Console.WriteLine("Starting update..."); + OutputProc("Starting update..."); break; case TGByondStatus.Updating: - Console.WriteLine("Applying update..."); + OutputProc("Applying update..."); break; default: - Console.WriteLine("Limmexing (This is an error)."); + OutputProc("Limmexing (This is an error)."); return ExitCode.ServerError; } return ExitCode.Normal; @@ -104,7 +104,7 @@ namespace TGCommandLine } catch { - Console.WriteLine("Please enter version as ."); + OutputProc("Please enter version as ."); return ExitCode.BadCommand; } @@ -112,7 +112,7 @@ namespace TGCommandLine if (!BYOND.UpdateToVersion(Major, Minor)) { - Console.WriteLine("Failed to begin update!"); + OutputProc("Failed to begin update!"); return ExitCode.ServerError; } @@ -123,7 +123,7 @@ namespace TGCommandLine stat = BYOND.CurrentStatus(); } var res = BYOND.GetError(); - Console.WriteLine(res ?? (stat == TGByondStatus.Staged ? "Update staged and will apply next DD reboot" : "Update finished")); + OutputProc(res ?? (stat == TGByondStatus.Staged ? "Update staged and will apply next DD reboot" : "Update finished")); return res == null ? ExitCode.Normal : ExitCode.ServerError; } public override string GetArgumentString() diff --git a/TGServerService/ChatCommands.cs b/TGServerService/ChatCommands.cs index c560c4bd1b..9ca1d13831 100644 --- a/TGServerService/ChatCommands.cs +++ b/TGServerService/ChatCommands.cs @@ -115,13 +115,13 @@ namespace TGServerService } protected override ExitCode Run(IList parameters) { + var type = TGByondVersion.Installed; if (parameters.Count > 0) if (parameters[0].ToLower() == "--staged") - OutputProc(Instance.GetVersion(TGByondVersion.Staged) ?? "None"); + type = TGByondVersion.Staged; else if (parameters[0].ToLower() == "--latest") - OutputProc(Instance.GetVersion(TGByondVersion.Latest) ?? "Unknown"); - else - OutputProc(Instance.GetVersion(TGByondVersion.Installed) ?? "Uninstalled"); + type = TGByondVersion.Latest; + OutputProc(Instance.GetVersion(type) ?? "None"); return ExitCode.Normal; }