Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Disable marseyapi flag
Browse files Browse the repository at this point in the history
  • Loading branch information
misandrie committed May 14, 2024
1 parent 0dfd3d5 commit c6b4f9c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions SS14.Launcher/LauncherCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Avalonia.Threading;
using Serilog;
using Splat;
using SS14.Launcher.Models.Data;
using SS14.Launcher.Models.Logins;
using SS14.Launcher.Utility;
using SS14.Launcher.ViewModels;
Expand Down Expand Up @@ -135,6 +136,13 @@ private async Task RunSingleCommand(string cmd)
// Redialling wait
await Task.Delay(ConfigConstants.LauncherCommandsRedialWaitTimeout);
}
else if (cmd == DMApiCommand)
{
// Disable Marsey API
DataManager cfg = Locator.Current.GetRequiredService<DataManager>();
cfg.SetCVar(CVars.MarseyApi, false);
Log.Information("Marsey API has been disabled.");
}
else if (cmd.StartsWith("R"))
{
// Reason (encoded in UTF-8 and then into hex for safety)
Expand Down Expand Up @@ -166,6 +174,7 @@ private async Task RunSingleCommand(string cmd)
// Command constructors

public const string PingCommand = ":Ping";
public const string DMApiCommand = ":DMAPI"; // Disable Marsey API
public const string RedialWaitCommand = ":RedialWait";
public const string BlankReasonCommand = "r";
public static string ConstructConnectCommand(Uri uri) => "c" + uri.ToString();
Expand Down

0 comments on commit c6b4f9c

Please sign in to comment.