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

@ -30,6 +30,12 @@ internal class DalamudCommands : IServiceType
ShowInHelp = false,
});
commandManager.AddHandler("/xlkill", new CommandInfo(this.OnKillCommand)
{
HelpMessage = "Kill the game.",
ShowInHelp = false,
});
commandManager.AddHandler("/xlhelp", new CommandInfo(this.OnHelpCommand)
{
HelpMessage = Loc.Localize("DalamudCmdInfoHelp", "Shows list of commands available."),
@ -142,6 +148,11 @@ internal class DalamudCommands : IServiceType
Service<Dalamud>.Get().Unload();
}
private void OnKillCommand(string command, string arguments)
{
Process.GetCurrentProcess().Kill();
}
private void OnHelpCommand(string command, string arguments)
{
var chatGui = Service<ChatGui>.Get();