Quote:
Originally Posted by Powerlord
Make the variables in this static on the off chance that a plugin is already using variables with these names.
|
Wouldn't work since both InitDebugLog and LogDebug need access.
Quote:
Originally Posted by Powerlord
Check if char works for single characters instead of using an int. (int flagChar = '0'; looks weird to say the least).
|
bool FindFlagChar(AdminFlag flag, int &c)
Would need to use view_as<int> anyway. I agree that it's weird but it is what it is.
Quote:
Originally Posted by Powerlord
adminFlag should be optional. After all, if you don't include DEBUG_ADMIN_CONSOLE or DEBUG_ADMIN_CHAT, it isn't used. Perhaps use ADMFLAG_GENERIC as the default value for adminFlag?
|
Agreed. Fixing.
Quote:
Originally Posted by Powerlord
Adjust InitDebugLog to process multiple admin flags correctly or convert it to use AdminFlag types in its signature instead. Right now, the BitToFlag line looks like it's going to barf if I pass in ADMFLAG_KICK|ADMFLAG_BAN for example. This is perfectly acceptable to CheckCommandAccess and will only match if an admin has both flags.
|
Done.
__________________