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

    Wolfeman

    Im good, i dont need my old stats :D
     
  3. Offline

    Boon Pek

    no. :p
     
  4. Offline

    Freakdk

    I won't be needing old stats either, just saying :]
     
  5. Offline

    Ratchet

    old stats aren't important to me because I deleted the mysql tables anyway after starting a new map.

    question regarding v5 though, my website is on a different host/server than the minecraft server, will I still be able to pull the stats to my site in v5 since it's not using mysql?
     
  6. I'm a good PHP Coder ;) ;)
    i can help out with a convertor of some sort. just hit me up with and info that i need (how the new database is layed out etc) and i can make one up. If you have Skype. Add me: trudan97 or you can contact me via my server server.sirdrakeheart.co.cc (its a website too, coded intierly in PHP, and via the site it promotes/demotes and controls the whole MC server just via the command shell)

    Edit: Btw, i am in UK (GMT +1 atm)
     
  7. Offline

    Valrix

    Sounds like most people don't care, which is good! That means I can forget that process and continue on to the main parts, such as localizing the plugin.

    That's the beauty of v5, the plugin and web code can be on opposite sides of the world and the only factor would be data transfer latency. Otherwise the API will allow for open connectivity from any language that supports HTTP requests to a non-80 port and can parse JSON strings. That means other plugins can get data from Netstats without actually having to hook into it, ever. Plus it supports multi-threading, so as requests come in, unless TONS of requests come in at once, the server should be perfectly fine.

    It's really not that important by the sounds of it, though if someone is really upset about it, you can feel free to help them in my stead. Otherwise with the improvements, I think most are quite willing to just ignore the old stats and start fresh with accurate data. Thanks for the offer though :) I'm also a good PHP coder (it's what I do every day actually) but tend not to have the time to sit and play with a MySQL DB to text key-value script that'll only be good for the people who still REALLY want their old stats and would be used once. The work outweighs the benefits at that point.

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

    Ratchet

    okay sounds good ^^ looking forward to it
     
  9. could you send me a dump of the new table layout? so i could get started on a convertor, i can then send you back a URL to add to the post. Also, if you need any help with the webstats, feel free to ask :p ;)
     
  10. Offline

    ThaMunsta

    I'm all for progress. Out with the old in with the new. I don't need my old stats either :)
     
  11. Offline

    Valrix

    Actually, with the new system the table layout is the same, but the actual data is different. Most is calculated differently, especially the time, and the transfer is different. When it comes to actual generation of the table, things are as easy now as it was before, but now a bit faster since it doesn't have to stroke a database. The web code has its own repo, but it's not updated yet since I've been working on making it compatible with the newest code. Luckily there isn't much to change and the help I've been getting from marshall007 has been great. Getting stats for a single player is almost done instantly on any browser, now I just need to alter it a bit to run through each character who's been updated instead of asking for one. It's all mostly little tweaks here and there as well as adding in some jQuery stuff for the admin to have more control over the site and enabling localStorage for people to customize their experience at the site. Once the code is more fleshed out I'll update the repo and you can have a stab at it.
     
  12. Offline

    rmkilc

    Old stats ARE important for me. Am I the only Yes vote? :eek:
     
  13. Offline

    Valrix

    So far, yes. You're the only one.
     
  14. Okay brilliant! i shall work on it as soon as it comes out :p

    I am too ;)
     
  15. Offline

    ThaMunsta

    How hard would it be to manually migrate it over for the few people that may want to keep old stats? Will there be an easy way to modify or inject stats?
    I just don't really want to see this get delayed tooooo much but if its important to some people than it should probably get implemented. If TurDan can get a working converter out than the plugin wouldn't have to be delayed and eventually those who need old stats could use his tool.
     
  16. Offline

    Boon Pek

    So you're implying that the bandwidth usage of this is lower when compered with the former MySQL? If so... SWEET! :D
     
  17. Offline

    Valrix

    Yes, the bandwidth usage should be a great deal smaller compared to the old versions as well as being a great deal faster since the only things being managed are strings. Many classes have been reduced in size because of this and only one new function had to be created to turn all player stats into a JSON string almost instantly. That's why I've been trying to make a big deal out of v5 is because it will run much faster and uses a lot less resources than any previous version so far. Not to mention soon I'll be adding the ability for it to track individual blocks that are being placed and broken, etc. since we no longer have to worry about the bandwidth issue and a MySQL database where asking for a couple hundred stats for each block would be pretty slow instead of reading a text file.
     
    Boon Pek likes this.
  18. Offline

    Davidx

    Please add 'netstatsSQLTableName' in v5, thanks.
     
  19. Offline

    Valrix

    Why?
     
  20. Offline

    Davidx

    I want to make few servers on one database and i need make custom name of netstats table.
     
  21. Offline

    bbq

    Ahhh really confused?
    So is it going to send HTTP request of some kind?? If so could I just write a PHP script to read that data and then push it onto MySQL. Soz, really attached to using MySQL.
     
  22. Offline

    Valrix

    I'm getting rid of MySQL database connectivity.

    There's no need for a MySQL database when the script will be fetching the live data from the Netstats plugin. This is so there won't need to be a database anymore.
     
  23. Offline

    KillerKlown

    I don't need an automated way to convert the old stats to the new system, but i'd love the ability to do it manually...
     
  24. Offline

    Valrix

    As long as you can view your database you can look at everyone's stats and when the server is generated and the player logs in it'll create their stats file. Once they leave you can manually add the values to their file and that's really all there is to it.
     
  25. Offline

    Oscarius

    Are we at 99% completed soon? :D
     
  26. Offline

    Valrix

    Haha, soon. I know how people love seeing progress, but we've reached the point where progress is slow because we're doing testing and refinement which is what takes the longest and you never really know how far along you are until you're nearly done.
     
  27. Offline

    KillerKlown

    Nice, I'm happy now... :)
     
  28. Offline

    Valrix

    Awesome :)
     
  29. Looking forward to this! (still!)
     
  30. Offline

    Valrix

    Haha, I know, I am too. Real life makes working on plugins a longer task than I'd like. Now if only there were more hours in a day or I didn't have to sleep...
     
  31. Offline

    Boon Pek

    I'm waiting...! :D
     

Share This Page