sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
336 stars 174 forks source link

[SBPP Checker] Callback and initial values #894

Open DosMike opened 1 year ago

DosMike commented 1 year ago

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?

Types of changes

Checklist:

Rushaway commented 4 months ago
DosMike commented 3 months ago
  • Can you change the version to 1.8.1 ?
  • Forward has to be created in the AskPluginLoad2

There you go :)