I assume some of you are already working on a custom chat client (like the guy in this thread). I saw that thread today and I was doing the same thing (analyzing the chat protocol). I think it's a good idea if we all work together and share our information. I would like to use this thread to collect information about the chat protocol so we don't have to do all the same work (although it's fun!).
With this information we can develop a client that connects to the chat server. This can be useful in several scenarios e.g. pimp your IM and let it tell you when your buddies play HoN.
For a good start I suggest we work on some basic things like:
- Sending/Receiving channel msgs
- Sending/Receiving private msgs
- Receiving buddy information (e.g. joined a game)
- Joining/Leaving a channel
- Keeping track of other players joining/leaving a channel
At the beginning this thread should be enough but while we go on the list of packets will increase and we might need another place where we can set up the information.
I'll try to keep the post as much updated as I can. Feel free to help us out and do some research I will be glad to add it!
So, I'll start with some mentioned basic stuff:
Join channel:Code:C->S ID: 0xFF DWORD: Account ID STRING: Cookie (always 32 byte?) DWORD: 0x02 (always 0x02?) S->C ID: 0x01 DWORD: 0x00 = No error
Leave channelCode:C->S ID: 0x1E STRING: Name of the channel to join S->C ID: 0x18 DWORD: 0x04 = Channel join ok??? STRING: Name of the joined channel DWORD: Channel ID Last 15 bytes: ????
Sending message to a channel:Code:C->S ID: 0x22 STRING: Channel name S->C ??
More will come really soon!Code:C->S ID: 0x03 STRING: Message DWORD: Channel ID S->C ??
Best of luck to the people who will be developing this software..
The entire chat protocol is basically all done for you in theli's source. Not saying that you should not investigate more, just saying there is no point in you doing all the work to find out something that theli has already got. I'd suggest looking at this source and then maybe adding to it.
The only real problem is, the cookie. You can't use both hon and something else that connects to the chat server unless you got the cookie from hon. Which I bet they made impossible but that would allow you to hijack someones account.
Last edited by Dub; 09-13-2009 at 09:31 PM.
We really could use a WELL documented protocol, and it would certainly be much easier if it was a community effort.
I developed a chat program (C# .NET) for HoN using Theli's code, but due to the issues I ran into with his HoNChat class, I wasn't able to finish it. If I could get past that then I could easily finish up the project. Sadly I don't know enough about networking to do all that protocol work myself.
So, apparently, the the packet to request the packet list is 0x1F
The server responds with quite a few packets after that
EDIT: Also, when you send a message to a channel, you just get a simple TCP ACK packet back.
EDIT: I got a different response from the server when joining a channel:
Channel LeaveCode:S->C ID: 0x9C (this looks to be different every time I join a channel, I got 0x6A in another channel) Int32: 00 00 00 04 (Channel Join OK? like yours?) STRING: Channel name Int32: Channel ID //Repeating for every member in channel: Int64: UserID? String: Member Name
Code:S-> C (13 bytes) ID: 0x09 Int32: 00 00 00 06 (Confirm?) 8 Bytes: Channel ID? it could be two Int32, or one Int64
Last edited by Kylegar; 09-15-2009 at 04:41 AM.
I PM'd this to T3rm1 but never got a response.
It would be a lot easier to talk and collaborate with instant messaging rather than forums.
I suggested IRC:
Last edited by T3rm1; 09-15-2009 at 01:34 PM.
NOTE: The recieve is still being worked on. And it is not accurate. Actually, it's totally wrong.