Raised This Month: $51 Target: $400
 12% 

Command logger


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   devicenull (200)
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 10-30-2004 , 08:14   Command logger
Reply With Quote #1

Logs client console commands.

Can log everything, or only those lines containing phrases registered with this server command: commandlogger_register
Can log to AMXX logs, HL logs or a custom logfile.

Read source for info on how to set the cvars up.

Remember to put the .amxx file on the very top of plugins.ini, also if you run several metamod plugins, move AMX Mod X on top of Metamod's plugins.ini.
Attached Files
File Type: sma Get Plugin or Get Source (commandlogger.sma - 4556 views - 4.9 KB)
Johnny got his gun is offline
Lasershock
Member
Join Date: Jul 2004
Old 10-30-2004 , 11:51  
Reply With Quote #2

thank you very much

best plugin ever!

ok i got it working but!

it seems it dont logg every cmd i told it to
tho i chosed to log to a custom filed it isnt, its logging to amxx file
is there a way to remove a cmd for logging?
Lasershock is offline
[415]StoNeD
Senior Member
Join Date: Mar 2004
Old 11-09-2004 , 22:13  
Reply With Quote #3

Sweet..
[415]StoNeD is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 11-11-2004 , 12:34  
Reply With Quote #4

I use
AMXMODX 0.2 041108 nightly

I've put this plugin at the top of plugins.ini
I have amxmodx_mm.dll at the top of metamod plugins.ini

I have this in amxx.cfg
Code:
commandlogger_logto 2
commandlogger_filepath addons/amxmodx/logs/custom/commands.log //THIS IS WRONG
commandlogger_register "amx_ban"
commandlogger_register "amx_kick"
commandlogger_register "amx_slap"
commandlogger_register "amx_chat"
commandlogger_register "amx_csay"
commandlogger_register "amx_tsay"
But nothing is written to the logfile

I also created the file commands.log because I thought it had to be done.
Does this plugin create the log file automatically if you have a custom file?

Any help is appriceated.

[EDIT 1]
OK one thing I have found out
If you use custom filepath it has to be like this
Code:
commandlogger_filepath custom/commands.log
Then the file is saved in addons/amxmodx/logs/custom/commands.log

But the thing is it only logs if I turn of the filter. No registered commands are logged.
So what isn't right here?
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 11-11-2004 , 15:20  
Reply With Quote #5

I don't know?

I tried this in server.cfg:

commandlogger_filter 1
commandlogger_filepath clientcommands.log
commandlogger_logto 2
commandlogger_register amx_help

Then I log on with a client, open console, and type this:
amx_hlp
amx_help
amx_hlp
(yeah amx_hlp misspelled twice, once before, once after the right time)

Then I check server console:
Quote:
L 11/11/2004 - 21:17:55: Log file started (file "cstrike\addons\amxmodx\logs\cli
entcommands.log") (game "cstrike") (amx "0.2")
L 11/11/2004 - 21:17:55: JGHG/STEAM_66666666 command: amx_help
So it seems to work ok.? It only logged once, and it logged to a new file...

Note that you need to find out what client "commands" aren't really client->server commands, but exist entirely only at clients. I think "name" is one of those, because "name" cmd is never sent to server. Name is then really a client cvar (and in that sense not a command at all), and there are lots of those.
Johnny got his gun is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 11-11-2004 , 15:29  
Reply With Quote #6

Btw I think that if you specify a subdir in custom path, it must exist! I don't think that the logging feature will/can create that subdirectory on its own, you will have to create it then... Or you could just try specifying a file. Or use standard amxx logs, because then you can have them saved per day etc, like you have specified in amxx.cfg.
Johnny got his gun is offline
lantz69
AMX Mod X Beta Tester
Join Date: Mar 2004
Location: Sweden, Skåne
Old 11-11-2004 , 15:54  
Reply With Quote #7

The subdirs work fine (because I created it )

This is what i get in the log file:
Code:
L 11/11/2004 - 19:38:49: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_slapmenu 
L 11/11/2004 - 20:16:08: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_slapmenu 
L 11/11/2004 - 20:22:01: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_slapmenu 
L 11/11/2004 - 21:22:04: Admin | jQt/STEAM_0:1:884266 command: amx_csay green STOP CAMPING.. ELSE SLAP/KICK/BAN ! ! !
L 11/11/2004 - 21:23:26: Admin | jQt/STEAM_0:1:884266 command: amx_csay green STOP CAMPING.. ELSE SLAP/KICK/BAN ! ! !
L 11/11/2004 - 21:23:27: Admin | jQt/STEAM_0:1:884266 command: amx_csay green WHERES THE BOMB PLANT/DEFUSE ??? ! ! !
L 11/11/2004 - 21:44:21: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_kickmenu 
L 11/11/2004 - 21:45:00: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_kickmenu 
L 11/11/2004 - 21:45:02: Admin | Sprayburk/STEAM_0:0:1587527 command: amx_slapmenu
That's really nice, but I want to see how many times they slap or kick or ban. Or maybe amx_tsay or amx_csay
Would that be possible ?
Because it would be easy to see how your admins are behaving. And it is all in the same file

You can look above to see what I've registered.
__________________
Using: Amxmodx 1.8.1.xxxx, cstrike
http://www.vanilla.se/
lantz69 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 11-11-2004 , 17:36  
Reply With Quote #8

Ahh well I guess your admins are slapping/kicking etc using menus? Then they are likely not using commands (well, slot1-0 I think are the commands really when using menus), but you wouldn't be able to get anyting out of that would you?
Because you don't know what menu the client is in... also slot1-0 is probably used for other stuff like selecting team and weapons in old gui.
Johnny got his gun is offline
a2vwvr6
Member
Join Date: Jul 2004
Old 11-15-2004 , 06:40  
Reply With Quote #9

Any chance this could be made to show on screen in amx_chat format so admins could see who is trying what server commands when it happens as well as log to file? I leave the amx_vote function open to people to help combat cheaters and to setup map votes etc. but lately we have been getting a lot of trolls who try and votekick/voteban everyone on the server or just make a nuisance of themselves with endless stupid votes. I don't want to pull "j" level access from my regulars but I sure as hell am not giving them any admin so being able to see who attempted what while I'm in my server would be nice. Something like "Player used command amx_voteban on STEAM:0:0xxxxxx" on screen in admin only chat would be great. I have an old amxmod plugin that worked great for this purpose up until I upgraded to .20 RC7 and now it doesn't work.
a2vwvr6 is offline
a10waveracer
Member
Join Date: Nov 2004
Location: 69.65.20.66:27015
Old 03-05-2005 , 21:31  
Reply With Quote #10

okay, I am having a problem with my logger.

It won't update, even though it has its (i presume) its temp file (named c) in the directory with the log, it hasn't updated for 2 or so weeks.

Any clue why?
a10waveracer is offline
Send a message via AIM to a10waveracer Send a message via MSN to a10waveracer
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 07:16.


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