58 lines
3.1 KiB
Markdown
58 lines
3.1 KiB
Markdown
# AdminStealth
|
|
|
|
A companion to CS2-SimpleAdmin's `css_hide` (`!hide`, `@css/kick`). SimpleAdmin's hide moves the
|
|
admin off the scoreboard. This plugin makes it look like they left the server:
|
|
|
|
- When an admin hides, every other player gets a `player_disconnect` event for them, sent to each
|
|
client only. The server and other plugins never see it, so the admin stays connected.
|
|
- While an admin is hidden, their team changes, their death and their real disconnect are not
|
|
broadcast to clients.
|
|
- Hiding lasts until the admin unhides. Hidden admins are saved by SteamID in
|
|
`configs/plugins/AdminStealth/hidden.json`. When one reconnects, or on a map change (SimpleAdmin
|
|
forgets hidden admins on both), their join isn't announced, the plugin runs `css_hide` for them
|
|
again once SimpleAdmin has loaded their permissions, and tells them they're still hidden. After
|
|
five tries (about 12 seconds) it gives up, forgets them and tells them they're visible.
|
|
- A hidden admin can't join a team or go to spectators (`jointeam` and `spectate` are blocked
|
|
with a chat message). If the game or another plugin puts them on a team anyway, which makes
|
|
SimpleAdmin unhide them, they're hidden again straight away.
|
|
- `status` from a player's console is blocked and prints nothing. It still works from the server
|
|
console and RCON.
|
|
|
|
The plugin listens for `css_hide` under whatever aliases SimpleAdmin's
|
|
`configs/plugins/CS2-SimpleAdmin/Commands.json` gives it (by default `css_hide` and `css_stealth`),
|
|
so adding aliases there (e.g. `css_invis`) works here too after a restart.
|
|
|
|
WebPanelBridge leaves hidden admins out of `css_webpanel_status`, so simpleadmin-web doesn't show
|
|
them either.
|
|
|
|
Built for CounterStrikeSharp **1.0.376** (`net10.0`) on Metamod:Source 2.0.0.1469, and needs
|
|
CS2-SimpleAdmin 1.8.2b's shared API (`CS2-SimpleAdminApi`). `lib/CS2-SimpleAdminApi.dll` is a
|
|
compile-time copy of the server's `shared/` one and isn't shipped. Without SimpleAdmin loaded, only
|
|
the `status` block works.
|
|
|
|
## Limits
|
|
|
|
- After a reconnect or map change, the admin is visible to SimpleAdmin (and so on the web panel) for
|
|
the few seconds it takes to hide them again.
|
|
- Unhiding doesn't announce the admin as joining again.
|
|
- The server browser and trackers get the player list from a separate server query, which this
|
|
doesn't touch, so they still list a hidden admin.
|
|
- Reloading CS2-SimpleAdmin on its own leaves this plugin listening to the old instance. Reload
|
|
AdminStealth after it.
|
|
|
|
## Install
|
|
|
|
Build with `cd plugins/AdminStealth && ../../build.sh`. Then copy the contents of
|
|
`compiled/AdminStealth/` to `game/csgo/addons/counterstrikesharp/plugins/AdminStealth/` on the
|
|
server.
|
|
|
|
Or install a release, which unpacks into `game/csgo/`:
|
|
|
|
```
|
|
tar -xzf AdminStealth-<tag>.tar.gz -C /srv/cs2/game/csgo
|
|
```
|
|
|
|
To publish one, commit, bump `ModuleVersion`, then run
|
|
`FORGEJO_TOKEN=... ./release.sh v<ModuleVersion>`. It rebuilds the plugin from the committed
|
|
source in the SDK container, tags HEAD, and uploads `AdminStealth-<tag>.tar.gz` to the git.zio.sh
|
|
release. The plugin has no config. The release never includes `hidden.json`.
|