mirror of
https://github.com/sbrl/Nibriboard.git
synced 2018-01-10 21:33:49 +00:00
[server] Add version subcommand to console & rearrange plane help
This commit is contained in:
parent
cc4ebc6c65
commit
6b359739d2
2 changed files with 23 additions and 8 deletions
|
@ -63,12 +63,15 @@ namespace Nibriboard
|
|||
await destination.WriteLineAsync("=================================");
|
||||
await destination.WriteLineAsync("Available commands:");
|
||||
await destination.WriteLineAsync(" help Show this message");
|
||||
await destination.WriteLineAsync(" version Show the version of nibriboard that is currently running");
|
||||
await destination.WriteLineAsync(" save Save the ripplespace to disk");
|
||||
await destination.WriteLineAsync(" plane list List all the currently loaded planes");
|
||||
await destination.WriteLineAsync(" plane create {new-plane-name} [{chunkSize}] Create a new named plane, optionally with the specified chunk size");
|
||||
await destination.WriteLineAsync(" plane status {plane-name} Show the statistics of the specified plane");
|
||||
await destination.WriteLineAsync(" plane {subcommand} Interact with planes");
|
||||
await destination.WriteLineAsync(" clients List the currently connected clients");
|
||||
break;
|
||||
case "version":
|
||||
await destination.WriteLineAsync($"Nibriboard Server {NibriboardServer.Version}, built on {NibriboardServer.BuildDate.ToString("R")}");
|
||||
await destination.WriteLineAsync("By Starbeamrainbowlabs, licensed under MPL-2.0");
|
||||
break;
|
||||
case "save":
|
||||
await destination.WriteAsync("Saving ripple space - ");
|
||||
await server.PlaneManager.Save();
|
||||
|
@ -77,7 +80,19 @@ namespace Nibriboard
|
|||
break;
|
||||
case "plane":
|
||||
if(commandParts.Length < 2) {
|
||||
await destination.WriteLineAsync("Error: No sub-action specified.");
|
||||
await destination.WriteLineAsync("Nibriboard Server Command Console: plane");
|
||||
await destination.WriteLineAsync("----------------------------------------");
|
||||
await destination.WriteLineAsync("Interact with planes.");
|
||||
await destination.WriteLineAsync("Usage:");
|
||||
await destination.WriteLineAsync(" plane {subcommand}");
|
||||
await destination.WriteLineAsync();
|
||||
await destination.WriteLineAsync("Subcommands:");
|
||||
await destination.WriteLineAsync(" list");
|
||||
await destination.WriteLineAsync(" List all the currently loaded planes");
|
||||
await destination.WriteLineAsync(" create {new-plane-name} [{chunkSize}]");
|
||||
await destination.WriteLineAsync(" Create a new named plane, optionally with the specified chunk size");
|
||||
await destination.WriteLineAsync(" status {plane-name}");
|
||||
await destination.WriteLineAsync(" Show the statistics of the specified plane");
|
||||
break;
|
||||
}
|
||||
string subAction = commandParts[1].Trim();
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Nibriboard
|
|||
get {
|
||||
Version asmVersion = Assembly.GetExecutingAssembly().GetName().Version;
|
||||
string commit = EmbeddedFiles.ReadAllText("Nibriboard.commit-hash.txt");
|
||||
return $"{asmVersion.Major}.{asmVersion.Minor}.{asmVersion.Build}-{commit.Substring(0, 7)}";
|
||||
return $"v{asmVersion.Major}.{asmVersion.Minor}.{asmVersion.Build}-{commit.Substring(0, 7)}";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue