Raised This Month: $ Target: $400
 0% 

logdebug.inc - Simple debug logging


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 02-27-2015 , 14:09   Re: logdebug.inc - Simple debug logging
Reply With Quote #12

Quote:
Originally Posted by Powerlord View Post
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 View Post
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 View Post
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 View Post
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.
__________________
Dr. McKay is offline
 


Thread Tools
Display Modes

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 23:18.


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