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

Command Logging with SQL v1.4(Updated 08/02/05)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Johnny got his gun (102)
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 07-23-2005 , 22:26   Command Logging with SQL v1.4(Updated 08/02/05)
Reply With Quote #1

This logs all commands done by admins.
Stored in .log file(s) or SQL depending on how you have the cvars/.sma set up.

Required Modules:
<dbi> if using SQL

This is an important update if you were using files instead of SQL.

Code:
/* * * * * * * * * * * * * * *  * Amx Mod X Script *   Command Logging. *                              * Plugin is used to Log all admin commands. * ******************************************* * Created by: $uicid3 V1.4 * * V1.0 - First creation. * V1.1 - Added DB support.(never released) * V1.2 - Added clcmd support. *   - Made SQL more advanced *   - Added example php files. *   - Added blockcmdlist.ini *   - Added Time to logs * V1.3 - Change code for less db calls. *   - Changed blockcmdlist.ini to log_cmdlist.ini *   - Added cvar: amx_cmd_list. *   - Cleaned up code again. Changed so plugin makes less db calls. *   - No longer Logs commands twice. * V1.4 - <font color="red">Fixed Bug in File Log with Steam ID.</font> * * This file is provided as is (no warranties).              * * This file is free software you can redistribute this as * you please. * ******************************************** * Credits: *    Idea/Concept : Everyone on the Forums who has asked for this. * ****************************************** * Cvar: amx_cmd_list * Sets how to use the log_cmdlist.ini file * 0 - Dont use file. (Log all cmds) * 1 - Use as a Block list. (Dont use commands listed in file) * 2 - Use as an Allow list. (Only use commands listed in file) * * Default is 1 ******** If Not using DataBases ****** * Everything gets logged into folder amxmodx/logs/Cmds/ * * Logged according to cvar: amx_cmd_log_file * 0 - One big file * 1 - By Admin Name * 2 - By Admin AuthID * 3 - By Date * 4 - By Map * * Default is 2 ******************************************** * In File Logging according to cvar: amx_cmd_logging * Cvar Value - Example Line: * --------------------------- * 0 - ADMIN [Time of Day] 'Name here' used 'cmd_here all "args here"' * 1 - ADMIN [Time of Day] 'Name here'<STEAM_ID_HERE> used 'cmd_here all "args here"' * 2 - ADMIN [Time of Day] 'Name here' used Cmd 'cmd_here' with args 'all "args here"' * 3 - ADMIN [Time of Day] 'Name here'<STEAM_ID_HERE> used Cmd 'cmd_here' with args 'all "args here"' * * Default is 3 ***** If using DataBases ******** * Just load plugin and change map. Everything will be done for you. * * Sql variables read out of amxmodx/configs/sql.cfg * * If any errors occur while using SQL it stops logging so you dont get the error for every command used. ;p ********************************************/ //Uncomment to use SQL //#define SQL_MODE

You NEED to have the directory amxmodx/logs/Cmds/ if not the plugin wont log the command and the commands dont work.
You need to have a log_cmdlist.ini. I Highly recommend using it. Which ever way you want as long as its there.

Please Note: A new cvar has been added. With regards to log_cmdlist.ini

I have included example PHP read-out pages. Feel free to use them or just use as a reference to make your own.

There is more information in the ReadMe files in the zip.
Attached Files
File Type: sma Get Plugin or Get Source (command_logger.sma - 3011 views - 8.9 KB)
File Type: zip command_logger_v1.4.zip (10.7 KB, 1722 views)
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
 



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 00:10.


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