Get command admin flags
I'm looking for a way to get admin flags of a SourceMod command, such as sm_kick.
GetCommandFlags provides only FCVAR_* flags (similar to GetConVarFlags), 0 for any SM commands. GetCommandOverride seems to provide the flags only when the command is overridden. The only way I've found so far is by using ReadCommandIterator, however, I would have to iterate every command each time I want to check. Or perhaps there is a way to get the handle of a specific command? Thank you in advance. |
Re: Get command admin flags
Quote:
|
Re: Get command admin flags
The whole point of this is that by having the flags only, I need to check if they are sufficient to access a command.
Here's a method of creating a temporary anonymous admin, setting their flags and then using it for CheckAccess. PHP Code:
Quote:
|
Re: Get command admin flags
I don't think there's a function to directly do what you want, though one could be added.
That said, flags aren't really useful if you're building a more featureful admin system. There's only so many flags available but there will be many commands (as you say, you have 400+). Groups and overrides may be the way to go, depending on what you're really trying to do. |
All times are GMT -4. The time now is 16:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.