Add automatic versioning and server configuration XML in preparation for services

This commit is contained in:
John Gross
2017-02-05 08:26:48 -08:00
parent fa63f3d811
commit d5159dc72a
33 changed files with 501 additions and 216 deletions

View File

@@ -9,13 +9,20 @@ namespace Torch.Commands
{
public class TorchCommands : CommandModule
{
#if DEBUG
[Command("fixit")]
public void Fixit()
{
Environment.Exit(0);
}
[Command("dbgcmd")]
public void Dbgcmd()
{
var commandManager = ((PluginManager)Context.Torch.Plugins).Commands;
Console.WriteLine(commandManager.Commands.GetTreeString());
}
#endif
[Command("help", "Displays help for a command")]
public void Help()
{
@@ -32,8 +39,7 @@ namespace Torch.Commands
if (command != null)
sb.AppendLine(command.HelpText);
if (children.Any())
sb.AppendLine($"Subcommands: {string.Join(", ", children)}");
sb.AppendLine($"Subcommands: {string.Join(", ", children)}");
Context.Respond(sb.ToString());
}
@@ -47,7 +53,7 @@ namespace Torch.Commands
[Command("ver", "Shows the running Torch version.")]
public void Version()
{
var ver = Context.Torch.Version;
var ver = Context.Torch.TorchVersion;
Context.Respond($"Torch version: {ver}");
}