PDA

View Full Version : is there any way to listen to all commands that RegAdminCmd triggers?


El Diablo War3Evo
11-06-2014, 21:43
i wanted to create a logging feature for it since i believe nothing exists currently to log everything off from that.

ddhoward
11-06-2014, 21:52
I'm on my mobile device right now so I can't go into more detail, but try looking into how sm_searchcmd gathers its list of commands.

El Diablo War3Evo
11-06-2014, 22:29
I'm on my mobile device right now so I can't go into more detail, but try looking into how sm_searchcmd gathers its list of commands.

So from what your telling me, I'd have to rehook RegAdminCmd to all the commands from the ReadCommandIterator to a specific callback and then do my logging stuff?

Sounds simple enough. If there is a better way, let me know plz.

Chdata
11-06-2014, 22:54
Try looking at console.inc

Impact123
11-06-2014, 23:55
Maybe this (https://sm.alliedmods.net/api/index.php?fastload=show&id=495&) and this (https://sm.alliedmods.net/api/index.php?fastload=show&id=496&) is what you're looking for.

DoPe^
11-07-2014, 11:44
Hmm I believe that this plugin does it

https://forums.alliedmods.net/showthread.php?p=1965353

El Diablo War3Evo
11-07-2014, 11:52
Hmm I believe that this plugin does it

https://forums.alliedmods.net/showthread.php?p=1965353

I looked at the source code for that plugin, and it uses OnLogAction which highly depends on a plugin to self trigger a log function. It does not record all RegAdminCmd triggers.

Once I get mine working, I'll post my plugin for all to use.

El Diablo War3Evo
11-07-2014, 12:41
Here is my new plugin for this:

https://forums.alliedmods.net/showthread.php?p=2221366#post2221366