issy123 / agario-protocol

Protocol for agar.io version 2.1.5
8 stars 2 forks source link

Protocol 18 - message 05 #21

Open Barbosik opened 5 years ago

Barbosik commented 5 years ago

Message 05 is used to notify client/server about friends.

The client sends message 05 with ascii null terminated string, which lists facebook friend id of all friends separated by character '|'.

Offset Size Description
0 byte =0x05
1 string zero terminated ascii string

For example the string with facebook id list may looks like this: "110139034002111|104404922207222" (these are fake id just for example), where 110139034002111 and 104404922207222 are facebook friend id

When server receives that message it starts to notify if listed players are present on the server. Without it, the server sends just empty 05 message.

The server sends message 05 with ascii null terminated string, which lists facebook friend id of all ONLINE friends separated by character '|'.

Offset Size Description
0 byte =0x05
1 uint32 playerId for online friend 1
5 string zero terminated ascii string with online friend 1 id
x uint32 playerId for online friend 2
x string zero terminated ascii string with online friend 2 id
... ... ...

with playerId you can find your friends on leaderboard and his cells

m-byte918 commented 5 years ago

fascinating

Barbosik commented 5 years ago

I found that the server sends message 05 each time when a new user is connected to the server. Even if a new user is not your friend.