mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 08:00:19 +01:00
Moves MoveServer() to ITGAdministration
This commit is contained in:
@@ -9,14 +9,39 @@ namespace TGCommandLine
|
||||
public AdminCommand()
|
||||
{
|
||||
Keyword = "admin";
|
||||
Children = new Command[] { new AdminViewGroupCommand(), new AdminSetGroupCommand(), new AdminClearGroupCommand(), new AdminViewPortCommand(), new AdminSetPortCommand() };
|
||||
Children = new Command[] { new AdminViewGroupCommand(), new AdminSetGroupCommand(), new AdminClearGroupCommand(), new AdminViewPortCommand(), new AdminSetPortCommand(), new AdminMoveServerCommand() };
|
||||
}
|
||||
public override string GetHelpText()
|
||||
{
|
||||
return "Manage server service authentication";
|
||||
}
|
||||
}
|
||||
|
||||
class AdminMoveServerCommand : Command
|
||||
{
|
||||
public AdminMoveServerCommand()
|
||||
{
|
||||
Keyword = "move-server";
|
||||
RequiredParameters = 1;
|
||||
}
|
||||
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
var res = Server.GetComponent<ITGAdministration>().MoveServer(parameters[0]);
|
||||
OutputProc(res ?? "Success");
|
||||
return res == null ? ExitCode.Normal : ExitCode.ServerError;
|
||||
}
|
||||
|
||||
public override string GetArgumentString()
|
||||
{
|
||||
return "<new path>";
|
||||
}
|
||||
|
||||
public override string GetHelpText()
|
||||
{
|
||||
return "Move the server installation (BYOND, Repo, Game) to a new location. Nothing else may be running for this task to complete";
|
||||
}
|
||||
}
|
||||
|
||||
class AdminSetPortCommand : Command
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user