Raised This Month: $32 Target: $400
 8% 

Catching all admin commands...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Squallkins
AlliedModders Donor
Join Date: Mar 2005
Old 07-02-2006 , 20:30   Catching all admin commands...
Reply With Quote #1

how would i go about catching all commands issued by an admin? e.g amx_ban,amx_slap and even rcon commands such as changelevel.
Squallkins is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-02-2006 , 20:44   Re: Catching all admin commands...
Reply With Quote #2

Quote:
Originally Posted by .:{EK}:. SQUALL
how would i go about catching all commands issued by an admin? e.g amx_ban,amx_slap and even rcon commands such as changelevel.
you can hook client_command, read the args, and check if the user is an admin by using get_user_flags or is_user_admin.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-02-2006 , 22:31   Re: Catching all admin commands...
Reply With Quote #3

I'm in the middle of finishing my Ultimage Logger plugin. It will log all this and much much more. There are a couple Command Loggers out there right now including my previous one for you right now. The other one is made by JGHG.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Zenith77
Veteran Member
Join Date: Aug 2005
Old 07-03-2006 , 12:20   Re: Catching all admin commands...
Reply With Quote #4

Also on a side note:

If you return PLUGIN_HANDLED (or 0 I think) and two or more plugins have or hooked/registered the same command, then you will prevent the core from executing any other command hooks on other plugins. So long as your plugin was loaded before the plugins that have hooked the same command in plugins.ini

(I hope thats right)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 18:15.


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