SwiftlyS2-SteamRestrict is a plugin for SwiftlyS2 that restricts player access to the server based on their Steam profile information.
It automatically checks players' Steam profiles using the Steam Web API and enforces restrictions such as:
- Minimum CS2 Level
- Minimum Hours Played
- Minimum Steam Level
- Minimum Account Age
- Block Private Profiles
- Block Banned Accounts (VAC, Trade, Game bans)
- Require Steam Group Membership
Players who do not meet the criteria are warned and eventually kicked from the server.
Need help or have questions? Join our Discord server:
-
📦Download Latest Plugin Version ⇢ Click Here -
⚙️Download Latest SwiftlyS2 Version ⇢ Click Here
- Download/build the plugin.
- Copy the published plugin folder to your server:
.../game/csgo/addons/swiftlys2/plugins/SteamRestrict/
- Ensure the plugin has its
resources/folder alongside the DLL (translations, gamedata). - Start/restart the server.
The plugin uses SwiftlyS2's JSON config system.
- File name:
config.json - Section:
swiftlys2/configs/plugins/SteamRestrict
On first run the config will be created automatically. The exact resolved path is logged on startup:
LogProfileInformations: Enable/disable informational logs (default: true)ChatPrefix: Prefix for chat messages (default: "[SteamRestrict]")ChatPrefixColor: Color for the chat prefix (default: "[red]")SteamWebAPI: Your Steam Web API key (required for functionality). You can obtain an API key from https://steamcommunity.com/dev/apikeyMinimumCS2Level: Minimum CS2 level required (default: -1, disabled)MinimumHour: Minimum hours played required (default: -1, disabled)MinimumSteamLevel: Minimum Steam level required (default: -1, disabled)MinimumSteamAccountAgeInDays: Minimum account age in days (default: -1, disabled)BlockPrivateProfile: Block players with private profiles (default: false)BlockTradeBanned: Block trade banned accounts (default: false)BlockVACBanned: Block VAC banned accounts (default: false)SteamGroupID: Require membership in this Steam group (leave empty to disable)BlockGameBanned: Block game banned accounts (default: false)PrivateProfileWarningTime: Time in seconds to warn private profile users before kick (default: 20)PrivateProfileWarningPrintSeconds: Interval for warning messages (default: 3)DatabaseConnectionString: Database connection string name/key used by SwiftlyS2 (default: "default")CacheExpirationDays: How long cached profiles stay in the database before cleanup deletes them (default: 30)
The plugin uses the Steam Web API to fetch detailed player profile information when they connect to the server.
If database caching is available, the plugin stores the fetched profile data in a database table and reuses it on future joins.
- If a player is found in the database cache, the plugin uses the cached data and does not call the Steam Web API for that join.
- If no cached entry exists (or database is unavailable), the plugin calls the Steam Web API and then writes the result to the database.
- Old cache entries are deleted by periodic cleanup after
CacheExpirationDays.
Most Information logs are only printed when LogProfileInformations is true. Warnings and errors are always logged.
Players are evaluated against the configured restrictions:
- Level and Hours: Minimum requirements for CS2 level, hours played, and Steam level
- Account Age: Ensures accounts are old enough to prevent new/alternative accounts
- Bans: Blocks players with VAC, trade, or game bans
- Privacy: Can block or warn players with private profiles
- Group Membership: Requires players to be members of a specific Steam group
Players who fail to meet the criteria receive warnings in chat and are eventually kicked from the server.
dotnet build- Original plugin KitsuneLab-Development/CS2-SteamRestrict
- Developed by agasking1337
- Readme template by criskkky