Raised This Month: $51 Target: $400
 12% 

DumpAdminCache Callback


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-27-2015 , 21:44   DumpAdminCache Callback
Reply With Quote #1

Hey there!

I've been trying to get Custom Chat Colors to work with Steam Group Admins for such a long time now. I've written a small plugin which executes DumpAdminCache(AdminCache_Groups, true) every 30 sec and that seems to work almost fine.

The problem is that I need to reapply all the Custom Chat Colors' effects to clients who have the particular flag (in my case: turn their text color to cyan).

TL;DR: How can I create a callback to DumpAdminCache in which I could safely do it so?

What I've got so far


I feel like I'm missing something very important but can't quite put my finger on it, so I'm turning my issue to the community. Thanks very much in advance!
Phil25 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-28-2015 , 04:00   Re: DumpAdminCache Callback
Reply With Quote #2

Yes, OnRebuildAdminCache (which the plugin should probably already be handling internally).
__________________
asherkin is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-28-2015 , 12:05   Re: DumpAdminCache Callback
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
Yes, OnRebuildAdminCache (which the plugin should probably already be handling internally).
Okay, I set this function up but it doesn't seem to be doing the trick. It executes, of course, but CheckCommandAccess(i, "", ADMFLAG_CUSTOM1, true) isn't returning true whereas it obviously should (I'm checking it with a command which requires the client to have that flag; even if I put that command's name in the second parameter and get rid of the 4th one).

However, if I have CheckCommandAccess check the flag 5 seconds after OnRebuildAdminCache, it works without a problem.

Can anyone help me clarify that one, please?

Last edited by Phil25; 10-28-2015 at 12:08.
Phil25 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-28-2015 , 12:10   Re: DumpAdminCache Callback
Reply With Quote #4

Are you using an asynchronous admin provider?
__________________
asherkin is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-28-2015 , 12:23   Re: DumpAdminCache Callback
Reply With Quote #5

Could you elaborate?

All I'm using for admins is the admins.cfg and Steam Group Admins, nothing more than that.

Last edited by Phil25; 10-28-2015 at 13:11.
Phil25 is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-28-2015 , 18:22   Re: DumpAdminCache Callback
Reply With Quote #6

something with sql.. like source bans or sql dmins will screw you
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 10-28-2015 , 19:11   Re: DumpAdminCache Callback
Reply With Quote #7

You mean any plugin which uses SQL? I don't use Sourcebans neither SQL Admins.
Phil25 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode