March 29, 2024, 01:35:47 pm

Author Topic: Activity Logger Finalized  (Read 3332 times)

0 Members and 1 Guest are viewing this topic.

Offline Sylar

  • Hero Member
  • *****
  • Posts: 776
  • Reputation: 5
  • Gray Man
    • View Profile
Activity Logger Finalized
« on: October 01, 2012, 11:08:47 pm »
Aaron_Ewing suggestion of the system to log player activity is complete and released officially. This post will detail it's usage!

Points to keep in mind:
    - The [Date] must be in the day/month/year format (01/10/2012).
    - The [Name] is the ingame name of who you're trying to get activity logs of.
    - There are a couple of known bugs that will be detailed somewhere within this post, so these bugs need not to be posted here.

Complete Syntax:
!activity [Name] [Date(dd/mm/yyyy)]
Example:
!activity Sylar 01/10/2012


When using the '!activity' command without a name or date, Republic will show you the complete syntax.

When using the command with only the [Name], and not the date specified, Republic will show you;
     - If [Name] is ingame: How long they have been ingame from the point they joined to the point you use the command.

     - If [Name] is not ingame: The last time they were seen ingame, with the total time they had been ingame for last.
           - At the moment, a bug that occurs randomly for an unknown reason causes players to be shown as they're ingame when using the command, even while they're not. The reason I say 'unknown' is because this doesn't occur every time, which means the name is deleted from the ingame players' file only sometimes, and I have no idea as to why.

When using the complete command (!activity [Name] [Date]), Republic will query you the times [Name] had been ingame on [Date].



That's pretty much it, yes!
« Last Edit: October 02, 2012, 10:15:57 am by Sylar »

Harry_Callahan

  • Guest
Re: Activity Logger Finalized
« Reply #1 on: October 01, 2012, 11:37:50 pm »
nice addition sy, hope you can get the bugs smoothed out soon.

Offline Saw

  • Bone County Fire Department
  • Sr. Member
  • *
  • Posts: 367
  • Reputation: 9
  • Bone County Fire Department
    • View Profile
Re: Activity Logger Finalized
« Reply #2 on: October 02, 2012, 03:17:00 am »
Awesome job! this will definitely be handy for administrator's and deciding on regular players! +1 For Sylar (for making it) and +1 for Aaron_Ewing (for the idea)  :D

Offline Cookiemonstah

  • Full Member
  • ***
  • Posts: 101
  • Reputation: 4
  • AKA Dazzler
    • View Profile
Re: Activity Logger Finalized
« Reply #3 on: October 02, 2012, 09:34:12 am »
- The [Date] must be in the day/month/year format (01/30/2012).

that dormat is MM/DD/YYYY you're using in that line... So what is it? :P

Nice job furthermore


Offline Sylar

  • Hero Member
  • *****
  • Posts: 776
  • Reputation: 5
  • Gray Man
    • View Profile
Re: Activity Logger Finalized
« Reply #4 on: October 02, 2012, 10:17:15 am »
- The [Date] must be in the day/month/year format (01/30/2012).

that dormat is MM/DD/YYYY you're using in that line... So what is it? :P

Nice job furthermore

Quote from: Fixed it!
    - The [Date] must be in the day/month/year format (01/10/2012).

Thanks, fixed it (though it can still be considered the tenth day of January, lol)! :P

Offline Littleman

  • Elite Member
  • Sr. Member
  • *****
  • Posts: 482
  • Reputation: -1
  • A life that touches others goes on forever.
    • View Profile
Re: Activity Logger Finalized
« Reply #5 on: October 02, 2012, 05:34:02 pm »
Yea Thank you aaron and sylar. Now i can keep tack of my scorewhoring <3
Blessed are they that mourn: for they shall be comforted.
Matthew 5:4
http://www.youtube.com/watch?v=n9cq2utk2JU

Offline Cookiemonstah

  • Full Member
  • ***
  • Posts: 101
  • Reputation: 4
  • AKA Dazzler
    • View Profile
Re: Activity Logger Finalized
« Reply #6 on: October 02, 2012, 10:14:11 pm »
Suggestion; Add a score variable to it, which counts how much the player increased in score in his online session, or over a period of time (so !activityscore Player X, y) where as X is starting time of calculation, Y is ending time (!activityscore Cookiemonstah 01/10/2012, 10/10/2012)

Would this be possible?


Offline Sylar

  • Hero Member
  • *****
  • Posts: 776
  • Reputation: 5
  • Gray Man
    • View Profile
Re: Activity Logger Finalized
« Reply #7 on: October 02, 2012, 10:19:52 pm »
It is possible, I just won't do it! Beyond what I can do with a phone. :|


Edit: Alternative methods popped into my head after posting this. May be added in the near future. :)
« Last Edit: October 02, 2012, 10:29:06 pm by Sylar »

Offline Sylar

  • Hero Member
  • *****
  • Posts: 776
  • Reputation: 5
  • Gray Man
    • View Profile
Re: Activity Logger Finalized
« Reply #8 on: October 04, 2012, 12:51:23 am »
It appears as though the bug mentioned in the main post has been fixed with a couple of tries; if anyone happens to spot a bug, or spot the known bug occur again, post here.

Now, to explain a little what was going on to anyone interested:
How this script works is that when a player goes in-game, it saves the name and time they went ingame to a file (Sy_IsIngame.txt). When a player is seen leaving, the script takes the time from the file into a variable, and deletes the saved line from the file that contains names of players ingame at the time, and the times they joined.
What turned into a problem was that when too many logouts occur at once, the script failed to remove the name from the file, so the old time they joined was still saved in the file. So, when the same player joins again, the new time is saved after the old login time; when they disconnect, the script looks for the first line, and takes the time in that line, and the result becomes some long play time (of like 1day 3hrs, so and so).

The script now saves every login to the top of the file, and as an additional check just to be sure, it will clear the file (Sy_IsIngame.txt) whenever the server is seen empty.



I'll be working on Paranoid's suggestion of logging total time a player has spent ingame, and if I find time (and ways to have it done through the activity system), it'll come soon.




I just felt like writing something long and neat, to be honest! lol
« Last Edit: October 04, 2012, 01:01:35 am by Sylar »

Offline GoR

  • Elite Member
  • Sr. Member
  • *****
  • Posts: 342
  • Reputation: -30
  • STOP GIVING ME BAD KARMA!
    • View Profile
Re: Activity Logger Finalized
« Reply #9 on: October 04, 2012, 06:17:07 am »
Finnaly done. And please make that !activityscore because it's gonna be awsum!


burekhunter

  • Guest
Re: Activity Logger Finalized
« Reply #10 on: October 04, 2012, 08:40:10 pm »
Nice one, wanna se its real POWER in action (: