Raised This Month: $63 Target: $400
 15% 

[ANY] adminWatch (v1.2.2)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
pat841
Member
Join Date: Jun 2013
Location: Boston
Plugin ID:
3680
Plugin Version:
1.2.2
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    245 
    Plugin Description:
    Tracks play time and server idle time for a specific admin flag and stores results in a database.
    Old 06-05-2013 , 19: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 - 890 views - 14.8 KB)
    File Type: zip adminwatch.zip (50.1 KB, 1983 views)
    __________________

    Last edited by pat841; 06-17-2013 at 18:13.
    pat841 is offline
    pat841
    Member
    Join Date: Jun 2013
    Location: Boston
    Old 06-06-2013 , 17:31   Re: [ANY] adminWatch (v1.0.2)
    Reply With Quote #2

    RESERVED.

    Note: Those who downloaded the earlier web script, I fixed an issue when converting from seconds to H:M:S which has now been re-uploaded.
    __________________
    pat841 is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 06-07-2013 , 07:22   Re: [ANY] adminWatch (v1.0.2)
    Reply With Quote #3

    NOTICE
    For people having issue with the plugin, check out my post here
    https://forums.alliedmods.net/showpo...&postcount=112

    time to spy on my admins! thanks for this.

    any chance you could add the admin names also to the database? and on the webpage.
    Since I can't remeber which steamid belongs to who in my head


    edit:
    And also something that could be awesome, the last time the admin connected to the server.
    And maybe also how many connections he have made.
    Aaaand something there would probly take some time to make, but something like weekly stats also.
    __________________

    Last edited by DoPe^; 07-05-2016 at 23:24.
    DoPe^ is offline
    pat841
    Member
    Join Date: Jun 2013
    Location: Boston
    Old 06-07-2013 , 16:25   Re: [ANY] adminWatch (v1.0.2)
    Reply With Quote #4

    Quote:
    Originally Posted by DoPe^ View Post
    time to spy on my admins! thanks for this.

    any chance you could add the admin names also to the database? and on the webpage.
    Since I can't remeber which steamid belongs to who in my head


    edit:
    And also something that could be awesome, the last time the admin connected to the server.
    And maybe also how many connections he have made.
    Aaaand something there would probly take some time to make, but something like weekly stats also.
    Updated the plugin with your suggestions. Thanks.
    __________________
    pat841 is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 06-07-2013 , 16:52   Re: [ANY] adminWatch (v1.0.2)
    Reply With Quote #5

    Quote:
    Originally Posted by pat841 View Post
    Updated the plugin with your suggestions. Thanks.
    awesome thank you! will I need to run something on the SQL part?
    __________________

    Last edited by DoPe^; 06-07-2013 at 16:52.
    DoPe^ is offline
    pat841
    Member
    Join Date: Jun 2013
    Location: Boston
    Old 06-07-2013 , 16:54   Re: [ANY] adminWatch (v1.0.2)
    Reply With Quote #6

    Quote:
    Originally Posted by DoPe^ View Post
    awesome thank you! will I need to run something on the SQL part?
    You can either drop the existing tables and have the plugin re-create the table or update the schema yourself. Here is the schema:

    PHP Code:
    CREATE TABLE `adminwatch` (
        `
    idINT(10NOT NULL AUTO_INCREMENT,
        `
    steamVARCHAR(50NOT NULL,
        `
    nameVARCHAR(50NOT NULL,
        `
    totalINT(11NOT NULL DEFAULT '0',
        `
    playedINT(11NOT NULL DEFAULT '0',
        `
    last_playedVARCHAR(50NOT NULL,
        
    PRIMARY KEY (`id`)
    )
    COLLATE='latin1_swedish_ci'
    ENGINE=MyISAM 
    __________________
    pat841 is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 06-07-2013 , 17:09   Re: [ANY] adminWatch (v1.0.3)
    Reply With Quote #7

    thanks i'll test it out
    __________________
    DoPe^ is offline
    cREANy0
    SourceMod Donor
    Join Date: Jul 2012
    Location: Germany
    Old 06-07-2013 , 20:36   Re: [ANY] adminWatch (v1.0.3)
    Reply With Quote #8

    Would it be possible to add a Week/Month statistic?
    __________________
    cREANy0 is offline
    ocwoody
    AlliedModders Donor
    Join Date: Nov 2010
    Location: huh
    Old 06-07-2013 , 20:54   Re: [ANY] adminWatch (v1.0.3)
    Reply With Quote #9

    Admin logging would be a great feature. There is currently only one working admin logging plugin (http://forums.alliedmods.net/showthread.php?t=60471), but it doesn't support mysql, nor does it have a web interface.

    I'm already using this for my community, but would love to see the above added!

    Last edited by ocwoody; 06-07-2013 at 21:14.
    ocwoody is offline
    DoPe^
    Veteran Member
    Join Date: Jul 2008
    Location: Denmark / Copenhagen
    Old 06-08-2013 , 08:55   Re: [ANY] adminWatch (v1.0.3)
    Reply With Quote #10

    hmm im getting this Warning on the webpage

    Code:
    Warning: date() expects parameter 2 to be long, string given in /home/clanroy2/public_html/adminwatch/index.php on line 29
    __________________
    DoPe^ is offline
    Reply


    Thread Tools
    Display Modes

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


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