Inactive [INFO/WEB] Netstats v5.0.4 - Keeps track of player playtime and online status [RB 1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by Valrix, Feb 13, 2011.

  1. Offline

    Valrix

    Netstats v5:
    COMPLETE!
    Keep up with development in BukkitDev!
    Netstats - Player Monitoring Plugin:
    Plugin Version: v5.0
    Web Version: v3.0

    Netstats watches players as they join and leave the server and keeps track of how long they've been logged into the server as well as keeping track of their current online/offline status while using very little system resources. The information is stored in a database which is defined by the user. First time using Netstats it will create the config file then disable itself until you change the config to match your database. Then you can reload or restart the server and it'll start collecting information immediately.
    Source Code: Netstats

    OLD CHANGELOG (open)

    Version 4.7
    • Bug fixes
    • If you don't supply a "database" in the config it will attempt to make it's own database named "NetStats" then create the table "netstats" inside it.
    • Fixed repetitive code and unnecessary MySQL connections when doing multiple queries one-after-another (reduces database calls, speeds up the code, and uses less resources).
    • Reduced code complexity (simplified certain calls and removed hacky functions to improve code performance by around 5-10% in my tests)
    Version 4.6
    • Fixed the bug that happened when trying to change the name of your stats table.
    • Fixed the bug that messed up everyone's total play time (sorry)
    • Code improvements and uses less code for database calls
    Version 4.5
    • Fixed the bug where folders weren't being made.
    Version 4.4
    • Converts the total play time to be saved as seconds instead of milliseconds to increase maximum play time. This will now match the PHP code, so if you changed it, change it back.
    • Now disables and re-enables itself instead of reloading the server when doing a wipe
    • Some code improvements
    Version 4.3
    • No longer requires the /lib/ folder since CB already contains the needed drivers
    • v5 is close to being ready and will bring large speed improvements
    Version 4.2
    • Fixes the bug that creates .stats folders instead of files.
    Version 4.1
    • Many code improvements to improve speed and memory usage.
    • Thanks to @jascotty2 for the code to fix how player and mob kills are handled
    Version 4.0
    • Many bug fixes
    • Changed how total play time was saved to the database
    • Fixed a bug with timed events
    • A new and improved Web update is nearly finished
    Version 3.9
    • Should work with RB 617
    Version 3.8
    • Fixed an issue with how files were handled.
    Version 3.7
    • Fixes issue of logged-in users being shown as offline after a reload
    • Fixed file creation bug where .stat files weren't being made properly
    Version 3.6
    • Fixed a bug where, depending on your region, your IP address was logged twice in the database. This was more of an issue with how the IP address was being grabbed than a problem with how it was stored.
    • Few other small fixes to prevent possible future bugs.
    Version 3.5
    • Changed how paths are managed by the plugin to be more OS-independent, hopefully fixing all "file not found" errors.
    • Removed checking if a database password exists or not.
    Version 3.4
    • Improved error logger that create a special log file with the exact info I'll need to find out what caused the problem.
    • Numerous bug fixes and speed tweaks
    Version 3.3
    • Added tracking of distance traveled
    • Added tracking of number of monsters a player has killed
    • Added tracking of number of other players a player has killed
    • Added the date of when the player first joined the server (after this version of Netstats has been installed, will only be correct after a full wipe of other stats)
    • Database will auto-build if it doesn't exist, otherwise it'll add columns if they're needed (so you don't have to do anything to update your database)
    • Config file now auto-updates and allows for comments (they need their own line however)
    • Many other code improvements and fixes to help it run faster and more efficiently.
    Version 3.2
    • Fixed the problem with saving to the database that everyone's been getting. (Only need the JAR)
    Version 3.1
    • Changed the namespace to com.sparkedia.valrix since I did the Java bit.
    Version 3.0
    • Rebuild of v1 to be more efficient.
    • Customized tracking based on "true" or "false"
    • What you don't want tracked won't be watched which improves performance
    • Timed updates (default is 90 seconds)
    • Fixed updating based on total actions user has done (default is 32)
    • Numerous performance tweaks
    • A "pretty" config file
    • Improved web script performance and added customized tracking (make it match your main config, variables are named the same for simplicity)
    • Web view tells when a player is still online and makes their name green if online, red if offline
    • Uses the "hybrid" method of player data saving like v1 to put less strain on the database
    • When saving to a database it is done dynamically so that only changed things are saved to cut down on the code needed and make smaller, faster calls to the database when saving (this was a big improvement on all previous versions)
    • Table name has been changed to "netstats" to not conflict with any other tables
    • NOTICE: You will need to remove your old data since it is outdated and the table is named differently with a few field name changes so make sure to use the .sql file to add it to your database. Please, before complaining about losing all the old data, realize that there's a 99% chance that it's wrong.
    Version 2.0
    • Complete revamp!
    • Now uses only flatfiles to store data, no more database issues!
    • Lots of code removed and improved for faster speed and less resource use
    • Customizable timed updates (default is every 30 seconds)
    • Customized tracking also reduces resource use by registering (or not registering) events as per your config so it only watches events that you want it to.
    • Web script will search for your CraftBukkit server when you first look at the web page.
    • You can choose where the server will save every player's .stats file by setting the "path" option in the config. The path is relative to your main server folder (where the world folder should be at). So if you set "path=../players/" then the .stats files will be in a folder called "players" in the folder that your server is in.
    • Table of player data is built depending on what your tracking and will change as you change the Netstats config file, nice and easy!
    • There are a few rules to setting paths that are listed above, make sure to read them!
    Version 1.8
    • Various code fixes and changes to improve how it runs.
    • Creates a new blank config file if it can't find one.
    • Only JAR has been changed. Get the newest one above, which I'll just reference from now on since it's faster than posting the same link over and over again.
    Version 1.7
    • Changed how files are accessed which should fix the "Too many files open" bug on Linux machines. Update the [JAR]
    Version 1.6
    • Hopefully fixed bug with connecting multiple times to a property file for each user. Only [JAR] needs updating.
    Version 1.5
    • Fixed a critical bug where user property files (where it saved your data before moving it to the database) wasn't re-defined when the plugin was reloaded. Now it looks for it after everything you do to make sure your data is always being recorded. Only the [JAR] needs to be updated.
    Version 1.4
    • Updated the files to work with the new constructor. You'll need only the [JAR] for this update.
    Version 1.3
    • Fixed a bug with how the plugin saves user data after a server crash
    • Added an Update.sql to add new columns to database table [Web.zip] (only for those upgrading from v1.2)
    Version 1.2
    • Added tracking of blocks broken
    • Added tracking of blocks placed
    • Added tracking of player deaths
    • Added more frequent tracking of total time online
    • Implemented new "safety" storage system
    • New storage system reduces number of database calls
    • Improved the way data is stored to database to take less code
    • The table of data is now ordered by who is online
    Version 1.1
    • Added tracking of player's last used IP address
    Version 1.0
    • Release of Netstats
    WEB CHANGELOG (open)

    Version 2.1
    • Some code cleanup and fixes as well as a better auto-updater that makes sure that the updater is the latest version before doing the actual update process.
    • Localization support for 7 different languages.
    • File name changes to be more netstats-specific which will prevent clashes of CSS and other pages.
    • Better include() and require() calls so a page is only added once which speeds up all the pages and keeps them from destroying each other.
    Version 2.0
    • Improved layout
    • Automatic code updates
    Version 1.0
    • Initial release of web code

    Donations: Don't forget to give amd3th some love too since he helped in making Netstats and came up with the idea (you rock!) as well as @marshall007 since he's been awesome by helping me in his spare time.
     
    Phaedrus, Niemand, D-Lew and 5 others like this.
  2. Offline

    Exidous

    Thats usually an indication to fix the problem....not to be a dick or anything. I had to take your plugin off because it was showing incorrect data. I read your posts (actually every page) and could not spot a fix, so im posting it again. Us server admins don't play much either dude, I spend 95% of my time updating website/forum/server with ZERO help so dont whine about not having the time, Server admins dont either. If you dont want to develop plugins dont. but as long as you have a problem with your plugin i will be the first to tell you until its fixed. So take your sweet time, Im not using it until its fixed anyway.
     
  3. Offline

    Valrix

    It's fine if people don't use it until it's fixed, and is generally what I'd prefer since it means less data corruption until the fix is done, but I have stated a good number of times that my idea is to just update to v5 which has a whole different way of running things so there will be a much, much smaller chance of data corruption as well as keeping a local cache of player data on the server itself and depending less on MySQL. Time will also be handled differently where conversion will be done by the plugin itself, stored locally, then sends it to the PHP upon request as well as many other code improvements I've been working on the past few days.

    I get you're not being a dick, and you're one of a handful who actually take the time to read the posts before posting yourself, which is fine. But the majority don't do so, which is what becomes irritating. I also understand the process of updating, which is why I'm working on automatic updates so you won't have to spend as much time working on it. Actually, that just gave me an idea on how to make updates even more streamlined.
     
  4. Offline

    mmitchell816

    Hey Valric you got any idea about what in this plugin is clashing with ItemCraft? If I load the server with item craft on your plugin is unable to connect to my database.
     
  5. Offline

    PlanetOfGames

    i can help with some of the PHP side of things :)

    i was planning to modify mine to include IConomy logging (MySQL only[for now]) :p
    with a admin panel for my admins to edit some stats, remove banned members ect.. and for me to enable/disable some plugin integration E.g what i mentioned above with Iconomy :)
     
  6. Offline

    Valrix

    Hmm, no I'm not sure why it would cause any conflicts, but v5 will fix all that.

    Cool. I'm going to be moving the web code to it's own git repo so it's easier to manage and get people to contribute to it easier. I plan on doing that today and hopefully getting the next version of the web code out which will fix a few things.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  7. Offline

    mmitchell816

    Awesome! Cause I'm setting up a sweet new server and both of these pugins are a must in my books!
     
  8. Offline

    Valrix

    I'm glad that you're so excited. Right now I'm fixing how flags are handled which required finding each country's country code and changing all the image names by hand. Wasn't very fun...but it'll fix some previous problems that were happening.
     
  9. Offline

    mmitchell816

    I do have one suggestion on that add an setting to set for which country the server is in. Like i connect directly to mine so the php script cant find my location cause its getting a private ip (172.28.xxx.xxx).
     
  10. Offline

    Valrix

    Yeah, I have a plan where the admin will be able to log into the admin page which will provide admin-only options like being able to create the flag for any given IP in case the script fails or you're accessing it using localhost or another unidentifiable IP.
     
  11. Offline

    BBFPaco

    Cool Plugin. I will wait for the next version though. Can't wait! :)
     
  12. Offline

    Ben1002

    If I set update time to "1" is that what.. 1 minute 1 hour or 1 day...??

    I set it to 1 and its been 10 minutes and still no updates :|

    maniacshost.info/2.1
     
  13. Offline

    Kiim

    Nice plugin but I can't get it to work :/

    I have use my database online (000hostweb.com) so I did input all the info in config file, but I just get error, it can't access the database...
    I'm runnig the server on my homecomputer. CB 766.

    My config:
    Code:
    # Netstats Properties File
    admin=kiim
    wipePass=Avakv2uv9Y
    host=mysql8.000webhost.com
    database=******_netstat
    username=******_netstat
    password=********
    # Both oldTable and newTable are optional
    oldTable=
    newTable=
    actions=32
    updateRate=90
    # Optional things to track. True = track, False = don't track
    trackIP=true
    trackBroken=true
    trackPlaced=true
    trackDeaths=true
    trackMonsterKills=true
    trackPlayerKills=true
    trackDistanceWalked=true
    revised=true
    
    Error, the first one I did get, after edit the config file:
    Code:
    # Netstats Error Log
    CraftBukkit Version: git-Bukkit-0.0.0-729-g5ee3f0f-b766jnks (MC: 1.5_02)
    Netstats Version: 4.7
    MySQL Error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
    
    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    Offending Statement: total=total/1000
    
    Sorry for big post :/
     
  14. Offline

    Valrix

    That's in seconds...I believe I've stated that before somewhere.

    Looks like it couldn't connect to the database properly then. You won't have to worry about this in v5 since it won't be using any MySQL through the plugin at all.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  15. Offline

    kahlilnc

    What do I put under Host:
    Do I put the website name?

    Ah this is so hard. Can someone make a vid?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  16. Offline

    Valrix

    You put the IP address or if the database is on the same server as the bukkit server is running just put "localhost".

    How is this in any way hard? If you can't set up a MySQL database, then why're you trying to run a bukkit server? Anyway, if you really need a vid that bad, go ask if @Samkio would be willing to make a setup/review vid for Netstats.
     
    Samkio likes this.
  17. Offline

    kahlilnc

    I have mysql but it is running on my wampserver. (A seperate server than my server.) But can I run this off my free google site?
     
  18. Offline

    Valrix

    As long as it supports PHP then you can put the web code anywhere.
     
    kahlilnc likes this.
  19. Offline

    Phantom Index

    Why can't you bother to explain what to do with the web files.

    I'm trying to get the files to run on a separate server while the plugin is in another. Some information would help.
     
  20. Offline

    Valrix

    Change the $host to the IP of the CB server and fill in the rest of the info like usual. It doesn't matter where the web files are as long as they can connect to the MySQL database.
     
  21. So. Compared to the old inactive "Achievements & Stats" plugin.... What is the difference between that and this? And why not continue on that one instead of doing all this from scratch? (Mostly wonder cause I love achievments :p)
     
  22. Offline

    Valrix

    This was started before that plugin was IIRC and this was already started from complete scratch as well as handling things in a much different way.
     
  23. Offline

    RebornSheep

    There is a really weird bug.
    Some players on the list are getting VERY much playtime suddenly. Some of my players have 41 years of playtime?! :S

    Is this possible to fix by my self, or do i have to wait for a new update for this plugin?
     
  24. Offline

    Plop

    Have the same problem:

    331a 11m 20j 12h 20min 4sec
     
  25. Ok. But the plans are that this plugin is going to include the same things and more?
    I'm a sucker for the Achivements so I'm stuck atm with not being able to update the server cause it will break the plugin.

    I'm following this plugin and just waiting for the Achivements to be done. Then I'll try this one out instead.
     
  26. Offline

    Valrix

    I'll try to add whatever I can to it. But I do suggest you update your server, even if it will break a few plugins otherwise you'll end up having to deal with more problems later on.

    Yes I've stated that I already know about it and that v5 will fix all database related issues.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  27. As it is now I got my server running quite stable so leaving it as it is will not be to much of a problem. It's the changes to it that I want to implement that I have to wait with.
     
  28. Offline

    Valrix

    Mmk, well I've been working on v5 a lot the past few days, so hopefully soon I will get enough done to start testing.
     
  29. Offline

    MrDylan

    Just getting a blank white screen for the web.

    What am I doing wrong?
     
  30. Offline

    Valrix

    I don't know. I can't see the files, etc. so I wouldn't know.
     
  31. No need to rush it. Thankful for the fact that you're working on it and rather wait for a fully working one than to ruch it. :)
     

Share This Page