using System.Collections.Generic; using TGS.Interface; namespace TGS.Server.ChatCommands { /// /// Retrieve the installed, staged, or latest availab /// sealed class ByondCommand : ChatCommand { /// /// Construct a /// public ByondCommand() { Keyword = "byond"; } /// protected override ExitCode Run(IList parameters) { var type = ByondVersion.Installed; if (parameters.Count > 0) if (parameters[0].ToLower() == "--staged") type = ByondVersion.Staged; else if (parameters[0].ToLower() == "--latest") type = ByondVersion.Latest; OutputProc(Instance.GetVersion(type) ?? "None"); return ExitCode.Normal; } /// public override string GetHelpText() { return "Gets the specified BYOND version"; } /// public override string GetArgumentString() { return "[--staged|--latest]"; } } }