Online list logging

A place for The Mana World players to discuss game-related topics outside the scope of development including guilds, player interactions, game meta and more.


Post Reply
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 653
Joined: 02 Jan 2009, 04:19
Location: Catland

Online list logging

Post by AnonDuck »

So I've been logging the online list to a sqlite database on and off for several years. It just grabs the online list every few seconds and records when people login or logout.. Also keeps track of total time online for any given player. This data can then be analyzed and displayed as useful information.


I had a few minutes today and figured I'd clean up/rewrite the code and release it.

Some sample runs of the included analysis scripts (on a new dataset)

Top 20 users sorted by total time spent in-game

Code: Select all

user@mana:~/logger/./top20.pl 
Top 20 most-online players:
	Kronos 1430 seconds
	Aryaes 1430 seconds
	webcam.now.im 1430 seconds
	ConfusedTree 1430 seconds
	Adelina 1430 seconds
	Biqcassy 1430 seconds
	reldin 1430 seconds
	Chaosava 1430 seconds
	Necromonger 1430 seconds
	SpkTwo 1430 seconds
	StarsavekCinderweb 1430 seconds
	Rabonbon 1430 seconds
	Oswalda 1430 seconds
	Apotheosis 1430 seconds
	V0id 1430 seconds
	Nightghost 1430 seconds
	Geologista 1430 seconds
	Zekrom 1430 seconds
	Chonkers 1430 seconds
	Garreth 1430 seconds
When a user was last seen. Maybe Tree could do this too?

Code: Select all

user@mana:~/logger/./seen.pl Dyna
Dyna last seen on Wed May  8 13:54:06 2013
Snoop on a user to see when they login/out

Code: Select all

user@mana:~/logger/./snoop.pl 4144
4144 login Wed May  8 13:54:06 2013
4144 logout Wed May  8 13:53:58 2013
4144 login Wed May  8 13:38:37 2013
4144 logout Wed May  8 13:38:05 2013
4144 login Wed May  8 13:21:19 2013
There are many more ways to analyze the data this logger collects. It can be used to determine what hours a player is likely to be online, etc.

Code is attached.
Attachments
tmw-online-logger-1.0.tar.gz
(1.77 KiB) Downloaded 123 times
Head of the TMW Illuminati
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Online list logging

Post by o11c »

Somebody needed to do this.

Many people are way to naive about privacy.
Former programmer for the TMWA server.
melkior
Warrior
Warrior
Posts: 320
Joined: 28 Dec 2008, 15:57

Re: Online list logging

Post by melkior »

MadCamel wrote: When a user was last seen. Maybe Tree could do this too?
I've been meaning to add this to the tree.

With the code you've provided, this might just happen sooner. :D
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 653
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Online list logging

Post by AnonDuck »

Small patch: Line 67 of logger.pl should be

Code: Select all

s/\s+$//g;
It was stripping spaces out of character names. :oops:
Head of the TMW Illuminati
Sanity
Peon
Peon
Posts: 33
Joined: 21 Oct 2012, 19:08

Re: Online list logging

Post by Sanity »

Can this be added as a function of main website?
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 653
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Online list logging

Post by AnonDuck »

I didn't expect there to be much interest in this, but there was :)

I've fixed a bunch of bugs and added some stuff.

Changelog:

Code: Select all

No longer compatible with old DB format. Start fresh (sorry)
Database size no longer grows out of control
Whitespace in character names is kept
GMs have (GM) stripped from their name
Added 'oldest' script to find the oldest players by account age
Seen script can now guess if a player is currently online or not
New version attached!
Attachments
tmw-online-logger-1.1.tar.gz
(2.26 KiB) Downloaded 112 times
Head of the TMW Illuminati
User avatar
Nard
Knight
Knight
Posts: 1113
Joined: 27 Jun 2010, 12:45
Location: France, near Paris

Re: Online list logging

Post by Nard »

We have been discussing for this kind of topic for a long time:

http://forums.themanaworld.org/viewtopic.php?t=15887
.
More: /w AuctionBot !lastseen MadCamel
##C[05:21] AuctionBot: I have last seen MadCamel 4 weeks ago.



And you fear the publication of server statistics!? This seems rather inconsistent to me... :?
"The language of everyday life is clogged with sentiment, and the science of human nature has not advanced so far that we can describe individual sentiment in a clear way." Lancelot Hogben, Mathematics for the Million.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 653
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Online list logging

Post by AnonDuck »

Neat. Had no idea AuxtionBot had seen.
Nard wrote:And you fear the publication of server statistics!? This seems rather inconsistent to me... :?
The online list is published openly and is entirely public. I am 100% for processing any and all public data into useful statistics and information. I'm just not sure that the map server logs should be made public (See other topic, silly to re-discuss here)
Head of the TMW Illuminati
User avatar
Nard
Knight
Knight
Posts: 1113
Joined: 27 Jun 2010, 12:45
Location: France, near Paris

Re: Online list logging

Post by Nard »

MadCamel wrote: The online list is published openly and is entirely public. I am 100% for processing any and all public data into useful statistics and information. I'm just not sure that the map server logs should be made public (See other topic, silly to re-discuss here)
I totally agree with this. Even without this list our presence ingame on a public server, is a public thing. However the extraction of some data out of them is the problem especially the sorting by account age. As I understood the previously expressed opinions, even online durations can be considered by some as privacy violation.
Note that if you read the thread I quoted, you'll see that it is not my opinion. On the opposite, your topic shows that I am right to say that the actual situation is: Only people with programming skills can access and retrieve information from server, if the whole data set is public everyone "can" do it and verify the information given elsewhere.

Anyway, as for guild, chat channels, manamarket... this kind of feature is part of the game and should be made availabe from content and server, not from a bot.
"The language of everyday life is clogged with sentiment, and the science of human nature has not advanced so far that we can describe individual sentiment in a clear way." Lancelot Hogben, Mathematics for the Million.
“There are two motives for reading a book; one, that you enjoy it; the other, that you can boast about it.” Bertrand Russell, Conquest of Happiness.
"If you optimize everything, you will always be unhappy." Donald Knuth.
Matt
Grand Knight
Grand Knight
Posts: 1759
Joined: 07 Aug 2004, 10:47
Location: Germany->Bavaria

Re: Online list logging

Post by Matt »

I did this too until 2009, you can create some cool statistics with that ;)
Post Reply