View Single Post
Author Message
pat841
Member
Join Date: Jun 2013
Location: Boston
Old 06-05-2013 , 18:35   [ANY] adminWatch (v1.2.2)
Reply With Quote #1

adminWatch v1.2.2


Description:
I have been developing small little plugins for my community and I thought I should share this one. Modify how you would like, just please give credit when necessary. What this plugin does is for a certain admin flag, it tracks and stores the total minutes an admin is connected to the server and the total time played (non-spec) in the database. This can be useful for many reasons such as in my case I like to track how active my admins in my servers. I will be requesting suggestions and I will update this plugin when needed, so any suggestions are more than welcome.

Features:
  • Keep track of admin idle time
  • Keep track of admin play time
  • Keep track of admin commands
  • Clean web interface
  • MySQL Database Storage

Cvars:
PHP Code:
sm_adminwatch_version // Prints the plugin version
sm_adminwatch_enabled <1/0// Enables or disables the plugin
sm_adminwatch_logging <1/0// Enables logging admin commands in database
sm_adminwatch_adminflag <1/FLAGS// 1 - All Admins, FLAGS = Flags to use such as "z" being root
sm_adminwatch_precision <0/1// 0 - Store time in seconds, 1 - Store time in minutes 
Install:
  1. Download the latest version of adminwatch.smx.
  2. Upload the plugin to your sourcemod/plugins/ directory.
  3. Add a database listing in /sourcemod/configs/databases.cfg with "adminwatch" (Example Below).
  4. Restart your server or use "sm plugins load adminwatch" in rcon.
  5. Edit the config in /cfg/sourcemod/adminwatch.cfg.
  6. If using the web script, edit databases.include.php with your database settings.
  7. Voila! You're good to go.
  8. OPTIONAL: Install the Updater plugin HERE to auto-update this plugin.

Databases.cfg Example:
Code:
	"adminwatch"
	{
		"driver"			"default"
		"host"				"localhost"
		"database"			"database"
		"user"				"username"
		"pass"				"password"
		//"timeout"			"0"
		//"port"			"0"
	}
Bugs:
  • None

ToDo:
  • Display admin stats to root using in-game menu.

Version Log:
Spoiler
Attached Files
File Type: sp Get Plugin or Get Source (adminwatch.sp - 1410 views - 14.8 KB)
File Type: zip adminwatch.zip (50.1 KB, 2909 views)
__________________

Last edited by pat841; 06-17-2013 at 17:13.
pat841 is offline