diff --git a/scripting/stac/stac_mapchange.sp b/scripting/stac/stac_mapchange.sp index ef14ed5..75dafd2 100755 --- a/scripting/stac/stac_mapchange.sp +++ b/scripting/stac/stac_mapchange.sp @@ -181,11 +181,7 @@ void ResetTimers() QueryTimer[cl] = CreateTimer ( - GetRandomFloat - ( - stac_min_randomcheck_secs.FloatValue, - stac_max_randomcheck_secs.FloatValue - ), + float_rand( stac_min_randomcheck_secs.FloatValue, stac_max_randomcheck_secs.FloatValue ), Timer_CheckClientConVars, userid ); diff --git a/scripting/stac/stac_stocks.sp b/scripting/stac/stac_stocks.sp index 1759096..e4710bb 100755 --- a/scripting/stac/stac_stocks.sp +++ b/scripting/stac/stac_stocks.sp @@ -706,6 +706,15 @@ public void OnLibraryAdded(const char[] name) // otherwise, it's a detection with a number of detections void StacNotify(int userid, const char[] prefmtedstring, int detections = 0) { + // This prevents a strange race condition where StAC seems to explode using ban + // systems that don't ban immediately, resulting in a ridiculous amount of discord spam. + // I'm still investigating, so this may not fully fix the issue. + int cl = GetClientOfUserId(userid); + if (userBanQueued[cl]) + { + return; + } + StacLogDemo(); if (!DISCORD) @@ -746,8 +755,6 @@ void StacNotify(int userid, const char[] prefmtedstring, int detections = 0) // this isn't used anywhere we're just using it to copy off of json_cleanup_and_delete(spacerField); - int cl = GetClientOfUserId(userid); - JSON_Object nameField; JSON_Object steamIDfield; if (userid)