Raised This Month: $51 Target: $400
 12% 

Time played for all users


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 06-30-2015 , 16:14   Time played for all users
Reply With Quote #1

hey, is there a plugin that count all players active time time spent on multiple servers that preferably log the time into a database. If not, is there anyone who would wanna take this challenge on?
A separate time log for the activity on each server for all players and a total time active on all servers for all players would be amazing.

So it would look like this (each row for a collumn in the db)

k0nan
(SteamID)
Total time: 242h 23m
Hide'n'Seek: 142h 10m
Surf: 50h 13m
Aim: 50h
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-30-2015 , 20:46   Re: Time played for all users
Reply With Quote #2

Paid? Volunteer? Helps to specify.

I dont know of any such plugin, but it wouldnt be all to hard to code one. One downside to it: sometimes players can disconnect and the OnClientPostAdminCheck event wont have fired. So, while this is usually not the case, occasionally it will not have a start time to compute the play time with. I have a plugin that logs this sort of stuff, but to FTP logs for each steam ID, not to a database. Also, do you need it to differentiate between time in spec vs time on teams? I feel that can make the values far more meaningful.
__________________
ThatOneGuy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 06-30-2015 , 23:42   Re: Time played for all users
Reply With Quote #3

I have not seen this posted here, but it should be done with mysql, not some silly flatfile implementstion.
Easy to write.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 06-30-2015 , 23:53   Re: Time played for all users
Reply With Quote #4

Quote:
Originally Posted by friagram View Post
I have not seen this posted here, but it should be done with mysql, not some silly flatfile implementstion.
Easy to write.
It is part of another plugin, so the flatfile made sense for it...dont talk shit til you know context...smh

As for the OP request, mysql is the only way I would suggest doing it (I dont think that was in question but wanted to clear up that I wasnt suggesting otherwise).
__________________
ThatOneGuy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-01-2015 , 01:32   Re: Time played for all users
Reply With Quote #5

Quote:
Originally Posted by ThatOneGuy View Post
It is part of another plugin, so the flatfile made sense for it...dont talk shit til you know context...smh

As for the OP request, mysql is the only way I would suggest doing it (I dont think that was in question but wanted to clear up that I wasnt suggesting otherwise).
Still fail, as the average popular server could get tens of thousands of unique visitors over a month, which is a lot of needless files. The context does not matter. Flatfile approach like this is beyond bad when much better alternatives are easily available.

Also, you dont need postadmincheck, onclientauthorized is the proper callback and happens much earlier.

Don't act like you know what you are doing and be insulting to others when you clearly know very little.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-01-2015 , 02:43   Re: Time played for all users
Reply With Quote #6

Quote:
Originally Posted by friagram View Post
Still fail, as the average popular server could get tens of thousands of unique visitors over a month, which is a lot of needless files. The context does not matter. Flatfile approach like this is beyond bad when much better alternatives are easily available.

Also, you dont need postadmincheck, onclientauthorized is the proper callback and happens much earlier.

Don't act like you know what you are doing and be insulting to others when you clearly know very little.
Your really eating your own words kiddo.

The plugin I mentioned involves admin checks, so OnClientPostAdminCheck IS required.
From clients.inc:
Spoiler

The plugin is namely logging admin actions, but includes play time, so mysql would be a terrible platform for such a plugin.

And the number of users is limited to the server admins, so it isnt thousands of unique visitors.

Try not to be so ignorant and rude next time...grow up a bit.

EDIT: Anyways...back on topic....I've coded the plugin, it compiles great, but it still needs testing. Right now, it separates the time into an SQL table column for both play time and another column for spectate time, and auto-appends two new columns every time a new server runs the plugin. I'm off to bed, but will test it tomorrow.
__________________

Last edited by ThatOneGuy; 07-01-2015 at 02:54.
ThatOneGuy is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 07-01-2015 , 17:33   Re: Time played for all users
Reply With Quote #7

I don't really follow all your advance talking XD
But I do however want the logging to be done with a MySQL database so I can output the data on my community.
Also, How's it going 'ThatOneGuy'? Have you got it to work?
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-02-2015 , 04:31   Re: Time played for all users
Reply With Quote #8

Quote:
Originally Posted by ThatOneGuy View Post
Your really eating your own words kiddo.

The plugin I mentioned involves admin checks, so OnClientPostAdminCheck IS required.
From clients.inc:
Spoiler

The plugin is namely logging admin actions, but includes play time, so mysql would be a terrible platform for such a plugin.

And the number of users is limited to the server admins, so it isnt thousands of unique visitors.

Try not to be so ignorant and rude next time...grow up a bit.

EDIT: Anyways...back on topic....I've coded the plugin, it compiles great, but it still needs testing. Right now, it separates the time into an SQL table column for both play time and another column for spectate time, and auto-appends two new columns every time a new server runs the plugin. I'm off to bed, but will test it tomorrow.

I'll not drag this on, but I do know what I'm talking about, and I will remind you that you are the one that took offense to my earlier message where perhaps the only negative thing i said was that your approach was 'silly.'

I'm not a fan of inferiority complexes, and it is silly to push on and ignore good advice when it is given. We're all wrong sometimes, and it's much better to learn to recognize our errors so we can improve, rather than follow along the same broken track forever. While simple and familiar is easy, it is not always the best.

As far as you thinking I'm a kid, it's likely that I am not only your senior in age, but skill/experience as well. Looking at your pervious posts, I see a pattern of hostility and empty praise. You're not an administrator, though most of your posts are laid out as if you were in some position of power. Let's not cling to a false sense of superiority or importance, and just focus on the tasks at hand.

That being said, I stick with my original assertion, that huge numbers of flat files are bad, sql is far superior, and that onclientauthorized is usually best for queries (because signal admin check can be greatly delayed by some plugins, thus causing postadmincheck to not fire in a timely manner). If it does indeed require admin checks, and it is time critical, you can use one of the earlier admin checks.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 07-02-2015 , 11:01   Re: Time played for all users
Reply With Quote #9

Quote:
Originally Posted by friagram View Post
I'll not drag this on, but I do know what I'm talking about, and I will remind you that you are the one that took offense to my earlier message where perhaps the only negative thing i said was that your approach was 'silly.'

I'm not a fan of inferiority complexes, and it is silly to push on and ignore good advice when it is given. We're all wrong sometimes, and it's much better to learn to recognize our errors so we can improve, rather than follow along the same broken track forever. While simple and familiar is easy, it is not always the best.

As far as you thinking I'm a kid, it's likely that I am not only your senior in age, but skill/experience as well. Looking at your pervious posts, I see a pattern of hostility and empty praise. You're not an administrator, though most of your posts are laid out as if you were in some position of power. Let's not cling to a false sense of superiority or importance, and just focus on the tasks at hand.

That being said, I stick with my original assertion, that huge numbers of flat files are bad, sql is far superior, and that onclientauthorized is usually best for queries (because signal admin check can be greatly delayed by some plugins, thus causing postadmincheck to not fire in a timely manner). If it does indeed require admin checks, and it is time critical, you can use one of the earlier admin checks.
I totally agree that SQL is better IN MOST SITUATIONS, and that onclientauthorized is preferable for getting steam IDs, when that is all that is required. I never disagreed to that, actually. I just said that you statement that SQL is ALWAYS better than writing to files isnt the case - there are specific situation where a file is preferable, and postadmincheck is required due to needing to know if they have certain flags when previous plugins are done handling them.

As to your allegations of my age, etc., and my attitude on these forums, I would have described you similarly, based on what I've seen of you. Other than my responses to you in this thread, my responses are rarely hostile. The only sense I've acted as an "admin" is telling people that bumping, cross-posting, and deleting threads after resolution are against forum rules. I don't stick to the "familiar", and even if I did, SQL is "familiar" just the same as writing to files...there are just some situations where it is not the best tool available.

As to this plugin though, I 100% agree with you on how it ought to be coded. The plugin is finished. I'm at work right now on break, but I'll PM the OP when I get home.
__________________
ThatOneGuy is offline
Schpraaankiii
Veteran Member
Join Date: Dec 2009
Location: Sweden Norrköping
Old 07-02-2015 , 11:30   Re: Time played for all users
Reply With Quote #10

Quote:
Originally Posted by ThatOneGuy View Post
The plugin is finished. I'm at work right now on break, but I'll PM the OP when I get home.
Thanks!
__________________
CAOSK-ESPORTS.COM
Schpraaankiii is offline
Send a message via Skype™ to Schpraaankiii
Reply



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 04:45.


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