@@ -240,22 +240,23 @@ private bool IsRestrictionViolated(CCSPlayerController player, SteamUserInfo use
240240 return false ;
241241
242242 BypassConfig bypassConfig = _bypassConfig ?? new BypassConfig ( ) ;
243+ PlayerBypassConfig ? playerBypassConfig = bypassConfig . GetPlayerConfig ( player . AuthorizedSteamID ? . SteamId64 ?? 0 ) ;
243244
244245 bool isPrime = userInfo . HasPrime ;
245246 var configChecks = new [ ]
246247 {
247- ( isPrime && ! bypassConfig . BypassMinimumCS2Level , Config . MinimumCS2LevelPrime , userInfo . CS2Level ) ,
248- ( ! isPrime && ! bypassConfig . BypassMinimumCS2Level , Config . MinimumCS2LevelNonPrime , userInfo . CS2Level ) ,
249- ( isPrime && ! bypassConfig . BypassMinimumHours , Config . MinimumHourPrime , userInfo . CS2Playtime ) ,
250- ( ! isPrime && ! bypassConfig . BypassMinimumHours , Config . MinimumHourNonPrime , userInfo . CS2Playtime ) ,
251- ( isPrime && ! bypassConfig . BypassMinimumLevel , Config . MinimumLevelPrime , userInfo . SteamLevel ) ,
252- ( ! isPrime && ! bypassConfig . BypassMinimumLevel , Config . MinimumLevelNonPrime , userInfo . SteamLevel ) ,
253- ( ! bypassConfig . BypassMinimumSteamAccountAge , Config . MinimumSteamAccountAgeInDays , ( DateTime . Now - userInfo . SteamAccountAge ) . TotalDays ) ,
254- ( Config . BlockPrivateProfile && ! bypassConfig . BypassPrivateProfile , 1 , userInfo . IsPrivate ? 0 : 1 ) ,
255- ( Config . BlockTradeBanned && ! bypassConfig . BypassTradeBanned , 1 , userInfo . IsTradeBanned ? 0 : 1 ) ,
256- ( Config . BlockGameBanned && ! bypassConfig . BypassGameBanned , 1 , userInfo . IsGameBanned ? 0 : 1 ) ,
257- ( ! string . IsNullOrEmpty ( Config . SteamGroupID ) && ! bypassConfig . BypassSteamGroupCheck , 1 , userInfo . IsInSteamGroup ? 1 : 0 ) ,
258- ( Config . BlockVACBanned && ! bypassConfig . BypassVACBanned , 1 , userInfo . IsVACBanned ? 0 : 1 ) ,
248+ ( isPrime && ( playerBypassConfig ? . BypassMinimumCS2Level ?? false ) , Config . MinimumCS2LevelPrime , userInfo . CS2Level ) ,
249+ ( ! isPrime && ( playerBypassConfig ? . BypassMinimumCS2Level ?? false ) , Config . MinimumCS2LevelNonPrime , userInfo . CS2Level ) ,
250+ ( isPrime && ( playerBypassConfig ? . BypassMinimumHours ?? false ) , Config . MinimumHourPrime , userInfo . CS2Playtime ) ,
251+ ( ! isPrime && ( playerBypassConfig ? . BypassMinimumHours ?? false ) , Config . MinimumHourNonPrime , userInfo . CS2Playtime ) ,
252+ ( isPrime && ( playerBypassConfig ? . BypassMinimumLevel ?? false ) , Config . MinimumLevelPrime , userInfo . SteamLevel ) ,
253+ ( ! isPrime && ( playerBypassConfig ? . BypassMinimumLevel ?? false ) , Config . MinimumLevelNonPrime , userInfo . SteamLevel ) ,
254+ ( playerBypassConfig ? . BypassMinimumSteamAccountAge ?? false , Config . MinimumSteamAccountAgeInDays , ( DateTime . Now - userInfo . SteamAccountAge ) . TotalDays ) ,
255+ ( Config . BlockPrivateProfile && ( playerBypassConfig ? . BypassPrivateProfile ?? false ) , 1 , userInfo . IsPrivate ? 0 : 1 ) ,
256+ ( Config . BlockTradeBanned && ( playerBypassConfig ? . BypassTradeBanned ?? false ) , 1 , userInfo . IsTradeBanned ? 0 : 1 ) ,
257+ ( Config . BlockGameBanned && ( playerBypassConfig ? . BypassGameBanned ?? false ) , 1 , userInfo . IsGameBanned ? 0 : 1 ) ,
258+ ( ! string . IsNullOrEmpty ( Config . SteamGroupID ) && ( playerBypassConfig ? . BypassSteamGroupCheck ?? false ) , 1 , userInfo . IsInSteamGroup ? 1 : 0 ) ,
259+ ( Config . BlockVACBanned && ( playerBypassConfig ? . BypassVACBanned ?? false ) , 1 , userInfo . IsVACBanned ? 0 : 1 ) ,
259260 } ;
260261
261262 return configChecks . Any ( check => check . Item1 && check . Item2 != - 1 && check . Item3 < check . Item2 ) ;
0 commit comments