sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

[SBPP Checker] Callback and initial values

Open DosMike opened this issue 2 years ago • 2 comments

Description

As user of the SourceBans Checker API I would like to be notified when the bans and commbans counters are actually valid, or at least be provided with fallback values until they are.

Motivation and Context

As of 1.8.0 the values in g_iBanCounts[client] and g_iCommsCounts[client] remain stale between a disconnect and the async OnConnectBanCheck callback. This might cause issues if you want to rely on, or react to these values as soon as they are available. If a plugin is polling values this would currently still give incorrect results for quite some time, even if the the client is ingame AND authorized, thus resetting the values to -1.

How Has This Been Tested?

  • [X] Smoke test in dev server + live env

Types of changes

  • [X] Bug fix (non-breaking change which fixes an issue)
  • [X] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [X] I have read the CONTRIBUTING document.

DosMike avatar May 25 '23 17:05 DosMike

  • Can you change the version to 1.8.1 ?
  • Forward has to be created in the AskPluginLoad2

Rushaway avatar Jun 01 '24 16:06 Rushaway

  • Can you change the version to 1.8.1 ?
  • Forward has to be created in the AskPluginLoad2

There you go :)

DosMike avatar Jun 13 '24 08:06 DosMike