mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-28 23:52:36 +01:00
Server => Interface
This commit is contained in:
@@ -28,7 +28,7 @@ namespace TGCommandLine
|
||||
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
var res = Server.GetComponent<ITGConfig>().DeleteFile(parameters[0], out bool unauthorized);
|
||||
var res = Interface.GetComponent<ITGConfig>().DeleteFile(parameters[0], out bool unauthorized);
|
||||
if (res != null)
|
||||
{
|
||||
OutputProc(res);
|
||||
@@ -64,7 +64,7 @@ namespace TGCommandLine
|
||||
}
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
var list = Server.GetComponent<ITGConfig>().ListStaticDirectory(parameters.Count > 0 ? parameters[0] : null, out string error, out bool unauthorized);
|
||||
var list = Interface.GetComponent<ITGConfig>().ListStaticDirectory(parameters.Count > 0 ? parameters[0] : null, out string error, out bool unauthorized);
|
||||
if(list == null)
|
||||
{
|
||||
OutputProc(error);
|
||||
@@ -88,7 +88,7 @@ namespace TGCommandLine
|
||||
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
OutputProc(Server.GetComponent<ITGConfig>().ServerDirectory());
|
||||
OutputProc(Interface.GetComponent<ITGConfig>().ServerDirectory());
|
||||
return ExitCode.Normal;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace TGCommandLine
|
||||
|
||||
protected override ExitCode Run(IList<string> parameters)
|
||||
{
|
||||
var bytes = Server.GetComponent<ITGConfig>().ReadText(parameters[0], parameters.Count > 2 && parameters[2].ToLower() == "--repo", out string error, out bool unauthorized);
|
||||
var bytes = Interface.GetComponent<ITGConfig>().ReadText(parameters[0], parameters.Count > 2 && parameters[2].ToLower() == "--repo", out string error, out bool unauthorized);
|
||||
if(bytes == null)
|
||||
{
|
||||
OutputProc("Error: " + error);
|
||||
@@ -148,7 +148,7 @@ namespace TGCommandLine
|
||||
{
|
||||
try
|
||||
{
|
||||
var res = Server.GetComponent<ITGConfig>().WriteText(parameters[0], File.ReadAllText(parameters[1]), out bool unauthorized);
|
||||
var res = Interface.GetComponent<ITGConfig>().WriteText(parameters[0], File.ReadAllText(parameters[1]), out bool unauthorized);
|
||||
if (res != null)
|
||||
{
|
||||
OutputProc("Error: " + res);
|
||||
|
||||
Reference in New Issue
Block a user