mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 05:56:58 +01:00
Fixes offlining an instance not changing the config
This commit is contained in:
@@ -126,6 +126,13 @@ namespace TGServerService
|
||||
return Config.Directory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets <see cref="InstanceConfig.Enabled"/> of <see cref="Config"/> to <see langword="false"/>
|
||||
/// </summary>
|
||||
public void Offline()
|
||||
{
|
||||
Config.Enabled = false;
|
||||
}
|
||||
|
||||
//mostly generated code with a call to RunDisposals()
|
||||
//you don't need to open this
|
||||
|
||||
@@ -593,6 +593,7 @@ namespace TGServerService
|
||||
if (ic.Name == Name)
|
||||
{
|
||||
path = ic.Directory;
|
||||
ic.Enabled = true;
|
||||
return SetupOneInstance(ic);
|
||||
}
|
||||
}
|
||||
@@ -612,6 +613,7 @@ namespace TGServerService
|
||||
var inst = (ServerInstance)host.SingletonInstance;
|
||||
host.Close();
|
||||
path = inst.ServerDirectory();
|
||||
inst.Offline();
|
||||
inst.Dispose();
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user