Tags: Ayrton09/PrimeGuard
Tags
v1.3.0: notify admins when a player's playtime is hidden Adds NotifyAdminsOnHiddenPlaytime (default false), alongside the existing ban and private-profile alerts. Like those, it never kicks on its own. Only reported for confirmed-public profiles: a private profile already shows up as "private profile", and a failed API lookup isn't the player's doing, so neither produces a duplicate or bogus alert. Config version bumped to 4.
v1.2.1: don't kick players whose Steam playtime is hidden Steam reports playtime_forever as 0 for every game when a player sets game details to Friends Only or enables "Always keep my total playtime private", which is indistinguishable from genuinely never having played. The plugin read that 0 as "0 hours" and kicked veterans with thousands of hours. - CS2PlaytimeMinutes is now int?, and a reported 0 is treated as unknown, so MinimumCS2HoursPlaytime simply doesn't apply to those players. Logs show cs2Hours=hidden instead of 0. - New KickWhenPlaytimeHidden option (default false) for servers that would rather require visible playtime, at the cost of also kicking private players. - Bypass SteamID lists now accept both quoted and unquoted values via a custom converter: an unquoted number previously threw a JsonException and stopped the whole plugin from loading over a missing pair of quotes. - Remove the now-unused GameDetailsReadable field.
v1.2.0: configurable chat colors, per-category bypasses, ban age limit
New features:
- ChatPrefix and AdminNotifyMessage are configurable and support {ColorName}
tags for any color in CS2's chat palette, plus {prefix}/{player}/{reasons}.
- Per-category bypasses for account checks, ban checks and private profile,
each accepting an admin flag and a SteamID64 whitelist.
- IgnoreBansOlderThanDays, so bans past a given age stop counting.
- New css_pgclearcache command to re-check players without waiting out the TTL.
Fixes found in audit:
- Cache stored partially failed lookups: if the ban endpoint failed while the
summary succeeded, the result was cached and ban checks were effectively
disabled for that player for the whole TTL. Now only fully resolved lookups
are cached, tracked per endpoint.
- css_pgcheck touched a player entity after the await without revalidating it,
risking a crash on map change and leaking one player's Steam data to another
who reused the slot.
- The API key is now trimmed: a pasted trailing space made every request 403,
silently failing open and filtering nobody.
- player_connect_full firing twice left a pending timer armed, causing a second
check with duplicate admin alerts and two kick commands.
- Every game-thread callback now runs through a guarded helper, so an exception
can no longer escape into the server's main thread, and callbacks scheduled by
an unloaded instance stop running after hot reload.
- The kick log no longer claims a kick that was skipped for a missing UserId.
- {player} is substituted last so a Steam name of "{reasons}" can't forge the
admin alert, and Sanitize now strips all control characters.
- Invalid SteamIDs in the bypass lists are reported on load instead of silently
never matching.
- Build against CounterStrikeSharp.API 1.0.371.
Simplify tab tag to set-once; build against CounterStrikeSharp 1.0.371 - Apply the private-profile clan tag once when the lookup returns, instead of re-applying every spawn. A working reference plugin (asapverneri/CS2-Clantags) sets it once on connect, so the per-round re-apply was unnecessary. - Drop the EventPlayerSpawn hook, the _tagPrivate tracking array, and the custom disconnect handler. - Bump CounterStrikeSharp.API to the latest stable (1.0.371).
Fix: missing communityvisibilitystate no longer treated as private A profile object returned without communityvisibilitystate (or unparseable) defaulted to visibility 1 => private => could be kicked when BlockPrivateProfile is on. That contradicted the fail-open contract. Now the field being absent/unparseable leaves IsProfilePrivate null (unknown => fail open); privacy is only decided when Steam actually reports the value.
PrimeGuard 1.0.0 CounterStrikeSharp plugin for CS2 that filters out accounts which don't meet minimum requirements (Steam level, account age, CS2 playtime, VAC/game bans, profile privacy) via the Steam Web API, and kicks them on connect. - 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_pgcheck command. - MIT licensed.