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

feat(main): add forward SBPP_OnClientPreAdminCheck #817

Closed maxime1907 closed 2 years ago

maxime1907 commented 2 years ago

Description

Add a forward SBPP_OnClientPreAdminCheck to control when OnClientPostAdminCheck will be called. We can then return a boolean to block the commands that will trigger OnClientPostAdminCheck:

RunAdminCacheChecks(i);
NotifyPostAdminCheck(i);

Motivation and Context

We are using https://github.com/R1KO/Vip-Core and we need to wait for both sourcebans-pp and vip-core to check if the player has a vip and/or an admin status so that we can trigger OnClientPostAdminCheck with the proper sourcemod admin flags

How Has This Been Tested?

In use on https://nide.gg for about two years implemented throught this module:

Types of changes

Checklist:

maxime1907 commented 2 years ago

cc @Hackmastr