Releases: Ayrton09/PrimeGuard
Release list
v1.3.0
New: NotifyAdminsOnHiddenPlaytime
Admins can now be told when a connecting player's CS2 playtime can't be read, alongside the existing ban and private-profile alerts:
Admins see:
[PrimeGuard] DOG connected — playtime hidden
Like the other two, it never kicks on its own — it's only a heads-up.
It is only reported for public profiles: a private profile already shows up as private profile, and a failed Steam lookup isn't the player's doing, so neither produces a duplicate or a bogus alert.
Built against CounterStrikeSharp.API 1.0.371.
v1.2.1
Fixed: players kicked for "0h" despite having thousands of hours
Steam doesn't say "playtime hidden" — it reports 0 hours for every game when a player sets Game details to Friends Only, or ticks "Always keep my total playtime private". PrimeGuard read that 0 as "never played" and kicked them.
A reported 0 is now treated as unknown, so MinimumCS2HoursPlaytime doesn't apply to those players and they are no longer kicked. The log shows cs2Hours=hidden for them.
The trade-off is that hiding playtime now also bypasses the hours check — Steam simply doesn't give servers that number. If you'd rather require it to be visible, set the new KickWhenPlaytimeHidden: true, keeping in mind it also kicks legitimate players who just keep their profile private.
Fixed: SteamIDs without quotes broke the config
[76561198069925935] threw a JSON error and stopped the whole plugin from loading. Quoted and unquoted forms are both accepted now:
"BypassAccountChecksSteamIds": [76561198069925935],
"BypassBanChecksSteamIds": ["76561198069925935"],Built against CounterStrikeSharp.API 1.0.371.
v1.2.0
New
- Configurable chat prefix and colors —
ChatPrefixandAdminNotifyMessageaccept{ColorName}tags for any color in CS2's chat palette, plus{prefix},{player}and{reasons}placeholders. Default is now{LightBlue}[PrimeGuard]{Default}. - Per-category bypasses — separate exemptions for account checks (level / age / playtime), ban checks, and private profile. Each takes an admin flag and a SteamID64 whitelist, so you can whitelist someone without making them an admin.
IgnoreBansOlderThanDays— let players in whose ban is older than a given age (e.g.1825for 5 years).css_pgclearcache— clears cached lookups so a player who just fixed their profile is re-checked immediately.
Caveat on ban age: Steam only reports the age of the most recent ban of any type, so an account with an old VAC but a recent game ban still counts as recently banned.
Fixed
- Cache stored partially failed lookups. If the ban endpoint failed while the profile lookup succeeded, the incomplete result was cached — effectively disabling ban checks for that player for the whole cache TTL. Only fully resolved lookups are cached now.
css_pgcheckused a player entity after the API call without revalidating it, which could crash on a map change or send one player's Steam data to whoever reused their slot.- The API key is now trimmed — a pasted trailing space made every request fail with 403, silently letting everyone through.
- Duplicate connect events could run the check twice, producing two admin alerts and two kick commands.
- Game-thread callbacks are now exception-guarded, and callbacks from an unloaded instance stop running after a hot reload.
- The kick log no longer reports a kick that was skipped.
- A player named
{reasons}could forge the admin alert; player names are now substituted last. - Invalid SteamIDs in the bypass lists are reported on load instead of silently never matching.
Built against CounterStrikeSharp.API 1.0.371.
v1.1.0
Soft-moderation options (all default off), so you can notify/tag instead of auto-kicking:
- NotifyAdminsOnBan / NotifyAdminsOnPrivateProfile — message online admins (AdminNotifyFlag) when a flagged player connects, without kicking.
- TagPrivateInTab / PrivateProfileTag — show a scoreboard tag (e.g.
[PRIVATE]) on private-profile players who aren't kicked.
Each acts independently of the kick checks. See the README for the recommended combos.
Built against CounterStrikeSharp.API 1.0.371.
v1.0.1
v1.0.0
First release of PrimeGuard — a CounterStrikeSharp plugin for CS2 that filters out accounts which don't meet minimum requirements and kicks them on connect.
What it does
Uses Steam Web API signals (Steam level, account age, CS2 playtime, VAC/game bans, profile privacy) to filter free-to-play accounts, smurfs and freshly created accounts — the real goal behind "Prime only".
⚠️ This does not detect real Prime status (that can't be read reliably from the server). See the README for details.
Highlights
- Fully configurable thresholds, each individually disable-able.
- Fails open: a Steam API failure/rate-limit never kicks legitimate players.
- Per-SteamID cache so reconnecting players don't re-query the API.
- Admin immunity flag, on-connect logging, and a
css_pgcheckcommand to tune thresholds.
Install
- Download
PrimeGuard.dllbelow and drop it inaddons/counterstrikesharp/plugins/PrimeGuard/. - Start the server once, set your
SteamWebApiKeyin the generated config, and reload.
Requires Metamod + CounterStrikeSharp and a free Steam Web API key.