Skip to content

Commit

Permalink
Alias for css_disconnected
Browse files Browse the repository at this point in the history
- css_last
- css_lastX (X = value from config)
  • Loading branch information
daffyyyy committed Sep 28, 2024
1 parent e272449 commit b1ab6e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CS2-SimpleAdmin/CS2-SimpleAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions CS2-SimpleAdmin/Commands/basecommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b1ab6e0

Please sign in to comment.