feat: add /xlkill

This commit is contained in:
Aireil 2023-02-25 17:36:09 +01:00 committed by GitHub
parent e3977f9493
commit d02b9606c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,6 +29,12 @@ internal class DalamudCommands : IServiceType
HelpMessage = Loc.Localize("DalamudUnloadHelp", "Unloads XIVLauncher in-game addon."),
ShowInHelp = false,
});
commandManager.AddHandler("/xlkill", new CommandInfo(this.OnKillCommand)
{
HelpMessage = "Kill the game.",
ShowInHelp = false,
});
commandManager.AddHandler("/xlhelp", new CommandInfo(this.OnHelpCommand)
{
@ -141,6 +147,11 @@ internal class DalamudCommands : IServiceType
Service<ChatGui>.Get().Print("Unloading...");
Service<Dalamud>.Get().Unload();
}
private void OnKillCommand(string command, string arguments)
{
Process.GetCurrentProcess().Kill();
}
private void OnHelpCommand(string command, string arguments)
{