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

    Ratchet

    still waiting for v5 :(
     
  3. Offline

    sukosevato

    Am I blind or is it just not there?

    What exactly does the webversion do? Can you see these statistics in a webbased interface?

    And if not, what commands can you use for this? The features sound nice, but I have no clue how they work.
     
  4. Offline

    surtic

    Update for 953?
     
  5. Offline

    nanashiRei

    The download for the webversion is broken D:
     
  6. Offline

    Linaks

    When will you finish v5 ?
     
  7. Offline

    Valrix

    Working on it guys. Sorry for being away, but I didn't have internet for about two weeks and since I'm getting help, I couldn't pull the repo updates which meant not being able to work on any of the code. Now that I'm back at the dorm, I can code all I like. I've pulled the updates and will work on the code a bit once I get a few things out of the way.

    Some good news though is that from what I saw of the updates (not by me), Netstats will run with true multi-threading so it can handle multiple client requests at the same time. When possible, I may look at the web code and see if there's a way to set up live updating of stats by using AJAX calls and looping that with background PHP scripts so the stats will update at a constant rate. Though it's not bandwidth-friendly, so I would usually be against it. Anyway, I will be working on it more and was informed I should use a better schema for stat transport to make the API more "developer friendly". I have an idea on how to do this while keeping it lean which can either be done in a custom format, or I can use JSON. If the JSON is easy enough to play with, I will use that since it can be used to easily communicate with JavaScript.
     
    Linaks likes this.
  8. Offline

    Linaks

    Thats perfect :) Nice to hear again from you
     
  9. Offline

    Valrix

    Agreed. It was horrible to be disconnected from everything besides my email and Twitter for nearly two weeks. I didn't have much to do and the more I was getting behind, the worse I felt so I hope to get a good amount done today to compensate. Just need to fix my bike first :-/
     
  10. Offline

    PlanetOfGames

    I can help you with all the automatic refreshing and I could add a option in the control panel to change the rate of updates or turn it off.
     
  11. Offline

    Valrix

    The idea was to create a jQuery to PHP loop that would loop a PHP connection to the server so there would be a nearly constant connection to the plugin to request data. But that wouldn't be bandwidth-friendly in any way. The best way to have auto-updating stats is just timed jQuery calls to the PHP page which would update ever set amount of time. But that would be a special setting for admins with either a LOT or unlimited bandwidth to spare. Though there will be a few ways to quickly refresh the data on the page without a reload since images are the most bandwidth-intensive.
     
  12. Offline

    PlanetOfGames

    well I could easily make a way to do it fast and reasonably bandwidth friendly considering the task, but It wouldn't be to hard to do I have all the code I would just need to implement it into your code.
     
  13. Offline

    dmitchell94

    the web download link is broken please update
     
  14. Offline

    Valrix

    Of course it is, it's because we're working on a big update and I'd prefer if people didn't have broken data to work with. Just stick around for the update.
     
  15. Offline

    dmitchell94

  16. Looking forward to this!
     
  17. Offline

    Schlumpfpirat

    Alright. I'm sorry to be annoying but over 1-2 months you are telling me that you will update it "soon".
    I'm done with these empty promises, this update will stay 4.7 for ages. I'm going to Statistican.
     
  18. Offline

    Valrix

    You're welcome to leave, though I feel you'll come back when v5 is ready. You're welcome to look at the repo as well since that shows work has been going on recently. The reason it's taking so long is because real life got in the way and we've had to rewrite whole classes to work more efficiently. v5 will also have an API for other devs and plugins to pull data from, which isn't something that's easy to create since you have to make sure everything stays lean, but is easy for other devs to use. Nearly all of yesterday, during my "free time" at work, I was working on the web code. That was around 3-4 hours that was spent working on Netstats instead of anything else. I'm sorry that it's taking so long, I really am, but I've been busting my ass to get this updated while trying to keep my other plugins from going inactive, dealing with reality (god help me), attending classes Monday-Thursday, and working Tuesday-Friday, which means I work Tuesday-Thursday, then attend night classes that are 3+ hours long after work.

    I don't mean to bitch, but I have literally no social life and have to take pills to concentrate and not break down due to depression daily while dealing with everything above. I understand it's been in development for a long time, and really wish I didn't have to sleep because I never have time to myself anymore along with an ever-expanding TODO list, but if I go too hard my body will shut down on me. I've also had to do most of this work on my own and finally have only one other person, who also works, to help me out. If I had more people helping, it would be much further along, or possibly out already, but I don't.

    If you want exact details of what's been going on, feel free to ask and I'll tell you every little detail of how things have been going.
     
  19. Offline

    Bonkerz

    still waiting for v5.
     
  20. Offline

    Scizzr

    @Bonkerz - Read more. :\
     
    Valrix likes this.
  21. Offline

    Crosshairs

    Spews Errors
    Kicks Players
    Refuses to let them in
    Needs an update
     
  22. Offline

    Thomas Carlsen

    OMG are you seroius!? how can you post something like taht whitout reading some other posts first!?
     
    Hamburger Helper and Valrix like this.
  23. Offline

    PlanetOfGames

    Read the other posts.. yes there is errors if not all most of them will be fixed in v5...
     
    Valrix likes this.
  24. Offline

    Crosshairs

    Because I Can
     
  25. Offline

    Valrix

    It's more helpful if you actually read the posts I make so you don't piss people off and I don't have to repeat myself.
     
  26. Offline

    bbq

    Sorry to annoy you (this is probably a well asked question) but I have written my own PHP interface and was wondering if it will still work in V5 with no changes?
    Could you put like a little bit of information on the first post like:
    *PANT* Third edit:
    I'm just saying that because its hard to read like 37 pages of posts :D
    Wow, fourth edit!
    That code looks really inefficient (even by my standards) or its just the way its done (you did say MySQL was bad with Java). I don't actually know Java but it looks like your recalculating everything every time you do something (or is that just the way you update MySQL?? I have never actually written a script to update a row in php!).
     
  27. Offline

    Valrix

    That's unfinished code you're looking at, if it's the right code at all. Your script won't work, but it will be quite easy to fix.
     
  28. Offline

    Ratchet

    v5? :( it's been 90% complete for weeks now!
     
  29. Offline

    ThaMunsta

    I too am getting pretty anxious... I wish I could afford to pay you cuz I honestly would if it meant getting this faster.
    Keep up the good work man
     
  30. Offline

    Valrix

    The 90% was before a few changes were made to allow an easier system for the API. After finding a few flaws in what I was first doing, it's been revamped a bit again to speed things up more and to allow the API to be more developer friendly.
     
  31. Offline

    bbq

    Sooo, I'll just have to change the way I read the date values (I actually don't bother seeing as they are stored in my user data table anyway).
    Getting a bit ahead here, but what if you put all the dates in a separate table (they would have a parentID column), that way you could implement a system providing a timeline of that players login/logout history.
     

Share This Page