You are not logged in.

#1 05 Apr 2007 7:42 pm

Mort
Member
From: Sydney
Registered: Apr 2007
Posts: 5
Website

Checking Buddy online status

Greetings,

I must say the wikis and various dev work have been brilliant and it's been fantastic to get our clan stats feed up and running, but one thing I've not noticed anyone talk about is checking the active "online" status of buddies.

In-game your buddy list will show you who's online/offline and where they are at, so there must be some sort of client query happening to get that info, does anyone know how that works? It would be great to create a small gadget or something to query what your buddies are up to without needing to go into the game itself.

We only do our stats feed once a day, but the buddy online checker would be a more "real-time" type check so I guess would be a lot smaller impact than a full stats dump?

Any thoughts / ideas?

Scott.

Offline

 

#2 05 Apr 2007 11:43 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Checking Buddy online status

I haven't looked at the built in buddy protocol yet, but I'd be surprised if that didn't require authentication w/ the ea servers.

a fairly low tech way of getting that info would be to pull the list of ranked servers (maybe even filter them down by the IP Addresses your local region), then query each of the ranked servers and get the list of players currently playing and watch for certain lists of people.  you could create a "buddy" table for your users, where they can add who to watch for, or you can just watch for everybody in your clan, and when they show up on one of the monitored servers, add their online status and server info of where they're playing.  it may sound like a lot of work, and it would be more stress on your server than the game stats, but the game servers aren't effected much by this (I know of at least 3 sites that do this).  The protocol to do this has been around for a while, its gamespy's v4 (or 3, cant remember off the top of my head which it is), and folks have already written code you can use for that (ex: gslist (master server list), and lgsl (in game player info / server info)).

Offline

 

#3 05 Apr 2007 11:58 pm

Mort
Member
From: Sydney
Registered: Apr 2007
Posts: 5
Website

Re: Checking Buddy online status

Try to query *every* ranked server? That's seems rather crude and probably not something I'm inclined to want to try. There must be a much simpler way to do it than that. If authentication is required then I don't have a problem with that as we already have that working when we connect to get our stats.

I don't really even know how that stuff works as another guy in our clan has worked all that out, but I would imagine there must be some simpler way to get your buddy stats in the same way the 2142 client does already... There must be some query you can do against a PID that returns the current server they are on and if they are logged in... The buddy list in 2142 does show people are online even when they aren't in a server, so it's got to exist somewhere as a simple query I would think.

Offline

 

#4 06 Apr 2007 8:40 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Checking Buddy online status

Mort :

Try to query *every* ranked server? That's seems rather crude and probably not something I'm inclined to want to try.

Agreed.  It was just a suggestion.  meanwhile I'll look to see what there is around the in game buddy list.  I only hope its as easy as the stats or server query protocol.

Offline

 

#5 06 Apr 2007 8:47 am

Mort
Member
From: Sydney
Registered: Apr 2007
Posts: 5
Website

Re: Checking Buddy online status

That would be cool. I'm just talking small clan based stuff here, I'm not trying to do any sort of open public service or anything.

Considering the buddy list appears to update in near real time, I was almost wondering if there's some sort of P2P thing going on. I can be watching my buddy list when no-one is on a server, and within 5 seconds of them joining, the list updates to show me which server they are on. I would imagine with that sort of real-time response it may be easier to sniff what's going on.

Offline

 

#6 06 Apr 2007 10:24 am

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Checking Buddy online status

I took a quick peek at it here at work.  it looks like its tied directly to the game log in process.

there are a series of client challenge / server response, where the server gives you a list of your buddies, and you can take that info and query for each buddy on your list.

I don't know / cant tell how tightly coupled that protocol is, whether you pull your own list (meaning players not in your local buddy list) of players or whether you can only query ones in the list the server gives you.  it looks like you may be able to send in queries for any player, and get their stats, but it uses session keys that are given as part of the list (with the players info from your buddy list), so until someone tries it out, we wont know.

here's a dump of the tcp traffic (this is more for me, so I can look at this a bit closer when I get home). lines separate client / server chatter

Code:

\lc\1\challenge\IHYUGWTHZH\id\1\final\

\login\\challenge\q3DNthoAPGJjrvV7d6wlg5mRPv5Tjta9\authtoken\B2Bq4AWKyFI8XW7ZITyXMYrHjLIWPSpaFXJ3XSHCQwMyCgtlKGs4HkZDBPdrsjv5mR0XzlAdfg9Q2PRojIKFr1fnA==\response\428dfd363ee0d5d279f168c3d6204a53\port\9920\productid\10709\gamename\stella\namespaceid\20\sdkrevision\3\id\1\final\

\lc\2\sesskey\22038017\proof\8e244f2755e36fb1d440cb393942a4a3\userid\69640344\profileid\82188143\uniquenick\Qw4z0\lt\pjR5NNwW1upvuViu3zm2Fb__\id\1\final\\bm\4\f\81246737\date\1175875952\msg\I have authorized your request to add me to your list\final\\bm\1\f\81246737\date\1175876022\msg\asdf\final\\bm\100\f\81246737\msg\|s|0|ss|Offline\final\

\status\1\sesskey\22038017\statstring\Online\locstring\Battlefield 2142\final\

\getprofile\\sesskey\22038017\profileid\81246737\id\2\final\

\pi\\profileid\81246737\nick\MadHatter2142\userid\68781086\sig\863bb2b2dca7a073a1c89edf247783fc\pid\18\firstname\\lastname\\lon\0.000000\lat\0.000000\loc\\id\2\final\

\bm\1\sesskey\22038017\t\81246737\msg\asdfasdf\final\

\logout\\sesskey\22038017\final\



\lc\1\challenge\SWRJLYCZHN\id\1\final\

\login\\challenge\V21CDSB2vtHFY0GyutWJvNlzOXT9n3tG\authtoken\B2Bc00bcO8o+yc2oy4fNX4LZZKhXjqCb+ruTMgVb+KGpc5VE0qbYAPRGuLeP3gHIPRHpyQkCefqfVPMJuSHmg0C0LQnzCDajn6kvXFoW/CAQTk=\response\09b89585139cf6801718922426dafd24\port\9926\productid\10709\gamename\stella\namespaceid\20\sdkrevision\3\id\1\final\

\lc\2\sesskey\131701165\proof\b0740366d97d647f7632af53611938d2\userid\68781086\profileid\81246737\uniquenick\MadHatter2142\lt\rrPePfqBdPzOAuw0yzwbDR__\id\1\final\\bm\1\f\82188143\date\1175876059\msg\asdfasdf\final\\bm\100\f\82533347\msg\|s|0|ss|Offline\final\\bm\100\f\81437920\msg\|s|0|ss|Offline\final\\bm\100\f\81306093\msg\|s|0|ss|Offline\final\\bm\100\f\81168298\msg\|s|0|ss|Offline\final\\bm\100\f\81242994\msg\|s|0|ss|Offline\final\\bm\100\f\82260954\msg\|s|0|ss|Offline\final\\bm\100\f\95467242\msg\|s|0|ss|Offline\final\\bm\100\f\82188143\msg\|s|0|ss|Offline\final\\bm\100\f\81465904\msg\|s|0|ss|Offline\final\

\status\1\sesskey\131701165\statstring\Online\locstring\Battlefield 2142\final\

\getprofile\\sesskey\131701165\profileid\82188143\id\9\final\

\pi\\profileid\82188143\nick\Qw4z0\userid\69640344\sig\ce33dc4b20f4b04e7e24729660580e1e\pid\18\firstname\\lastname\\lon\0.000000\lat\0.000000\loc\\id\9\final\

\logout\\sesskey\131701165\final\

Offline

 

#7 11 Apr 2007 12:53 pm

sanman
Member
Registered: Mar 2007
Posts: 12

Re: Checking Buddy online status

MadHatter :

I took a quick peek at it here at work.  it looks like its tied directly to the game log in process.

there are a series of client challenge / server response, where the server gives you a list of your buddies, and you can take that info and query for each buddy on your list.

I don't know / cant tell how tightly coupled that protocol is, whether you pull your own list (meaning players not in your local buddy list) of players or whether you can only query ones in the list the server gives you.  it looks like you may be able to send in queries for any player, and get their stats, but it uses session keys that are given as part of the list (with the players info from your buddy list), so until someone tries it out, we wont know.

here's a dump of the tcp traffic (this is more for me, so I can look at this a bit closer when I get home). lines separate client / server chatter

Code:

\lc\1\challenge\IHYUGWTHZH\id\1\final\

\login\\challenge\q3DNthoAPGJjrvV7d6wlg5mRPv5Tjta9\authtoken\B2Bq4AWKyFI8XW7ZITyXMYrHjLIWPSpaFXJ3XSHCQwMyCgtlKGs4HkZDBPdrsjv5mR0XzlAdfg9Q2PRojIKFr1fnA==\response\428dfd363ee0d5d279f168c3d6204a53\port\9920\productid\10709\gamename\stella\namespaceid\20\sdkrevision\3\id\1\final\

\lc\2\sesskey\22038017\proof\8e244f2755e36fb1d440cb393942a4a3\userid\69640344\profileid\82188143\uniquenick\Qw4z0\lt\pjR5NNwW1upvuViu3zm2Fb__\id\1\final\\bm\4\f\81246737\date\1175875952\msg\I have authorized your request to add me to your list\final\\bm\1\f\81246737\date\1175876022\msg\asdf\final\\bm\100\f\81246737\msg\|s|0|ss|Offline\final\

\status\1\sesskey\22038017\statstring\Online\locstring\Battlefield 2142\final\

\getprofile\\sesskey\22038017\profileid\81246737\id\2\final\

\pi\\profileid\81246737\nick\MadHatter2142\userid\68781086\sig\863bb2b2dca7a073a1c89edf247783fc\pid\18\firstname\\lastname\\lon\0.000000\lat\0.000000\loc\\id\2\final\

\bm\1\sesskey\22038017\t\81246737\msg\asdfasdf\final\

\logout\\sesskey\22038017\final\



\lc\1\challenge\SWRJLYCZHN\id\1\final\

\login\\challenge\V21CDSB2vtHFY0GyutWJvNlzOXT9n3tG\authtoken\B2Bc00bcO8o+yc2oy4fNX4LZZKhXjqCb+ruTMgVb+KGpc5VE0qbYAPRGuLeP3gHIPRHpyQkCefqfVPMJuSHmg0C0LQnzCDajn6kvXFoW/CAQTk=\response\09b89585139cf6801718922426dafd24\port\9926\productid\10709\gamename\stella\namespaceid\20\sdkrevision\3\id\1\final\

\lc\2\sesskey\131701165\proof\b0740366d97d647f7632af53611938d2\userid\68781086\profileid\81246737\uniquenick\MadHatter2142\lt\rrPePfqBdPzOAuw0yzwbDR__\id\1\final\\bm\1\f\82188143\date\1175876059\msg\asdfasdf\final\\bm\100\f\82533347\msg\|s|0|ss|Offline\final\\bm\100\f\81437920\msg\|s|0|ss|Offline\final\\bm\100\f\81306093\msg\|s|0|ss|Offline\final\\bm\100\f\81168298\msg\|s|0|ss|Offline\final\\bm\100\f\81242994\msg\|s|0|ss|Offline\final\\bm\100\f\82260954\msg\|s|0|ss|Offline\final\\bm\100\f\95467242\msg\|s|0|ss|Offline\final\\bm\100\f\82188143\msg\|s|0|ss|Offline\final\\bm\100\f\81465904\msg\|s|0|ss|Offline\final\

\status\1\sesskey\131701165\statstring\Online\locstring\Battlefield 2142\final\

\getprofile\\sesskey\131701165\profileid\82188143\id\9\final\

\pi\\profileid\82188143\nick\Qw4z0\userid\69640344\sig\ce33dc4b20f4b04e7e24729660580e1e\pid\18\firstname\\lastname\\lon\0.000000\lat\0.000000\loc\\id\9\final\

\logout\\sesskey\131701165\final\
What tool do you use?

Offline

 

#8 11 Apr 2007 1:19 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Checking Buddy online status

http://www.ethereal.com/

Sorry Mort, haven't had a chance to look at this yet.  Its on my todo list though.

Offline

 

#9 11 Apr 2007 5:29 pm

Mort
Member
From: Sydney
Registered: Apr 2007
Posts: 5
Website

Re: Checking Buddy online status

No problem. I'm just glad it's even on your todo list smile

I'm actually surprised that no-one else seems to have already thought to work it out though, but I've been without it for this long now, so I'm happy to wait for anything whenever you have the time.

Offline

 

#10 03 May 2007 7:14 am

Mort
Member
From: Sydney
Registered: Apr 2007
Posts: 5
Website

Re: Checking Buddy online status

I almost forgot about this again... I'm guessing no updates means no time to look at it as yet?

Offline

 

#11 03 May 2007 1:33 pm

MadHatter
Administrator
From: Dallas TX
Registered: Jun 2006
Posts: 529
Website

Re: Checking Buddy online status

I've looked at it a little bit.  if the challenge / request is the same as the server query protocol then it should be pretty easy to emulate.  if not it could take a while to figure out.

Offline

 



© 2003 - 2018 NullFX
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License