From b1ab6e0e0d632061808b4f6236b37a07958a79f2 Mon Sep 17 00:00:00 2001 From: Dawid Bepierszcz <41084667+daffyyyy@users.noreply.github.com> Date: Sat, 28 Sep 2024 18:33:41 +0200 Subject: [PATCH] Alias for css_disconnected - css_last - css_lastX (X = value from config) --- CS2-SimpleAdmin/CS2-SimpleAdmin.cs | 3 +++ CS2-SimpleAdmin/Commands/basecommands.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/CS2-SimpleAdmin/CS2-SimpleAdmin.cs b/CS2-SimpleAdmin/CS2-SimpleAdmin.cs index f52a65a..6c6d083 100644 --- a/CS2-SimpleAdmin/CS2-SimpleAdmin.cs +++ b/CS2-SimpleAdmin/CS2-SimpleAdmin.cs @@ -112,6 +112,9 @@ public void OnConfigParsed(CS2_SimpleAdminConfig config) PluginInfo.ShowAd(ModuleVersion); if (Config.EnableUpdateCheck) Task.Run(async () => await PluginInfo.CheckVersion(ModuleVersion, _logger)); + + AddCommand($"css_last{Config.OtherSettings.DisconnectedPlayersHistoryCount}", + "Show last x disconnected players", OnDisconnectedCommand); } private static TargetResult? GetTarget(CommandInfo command) diff --git a/CS2-SimpleAdmin/Commands/basecommands.cs b/CS2-SimpleAdmin/Commands/basecommands.cs index 0db6de1..4c2f832 100644 --- a/CS2-SimpleAdmin/Commands/basecommands.cs +++ b/CS2-SimpleAdmin/Commands/basecommands.cs @@ -477,6 +477,7 @@ await Server.NextFrameAsync(() => } [ConsoleCommand("css_disconnected")] + [ConsoleCommand("css_last")] [CommandHelper(whoCanExecute: CommandUsage.CLIENT_ONLY)] [RequiresPermissions("@css/kick")] public void OnDisconnectedCommand(CCSPlayerController? caller, CommandInfo command)