BNETDocs
C>S 0x0A SID_ENTERCHAT
Message Id:0x0A
Message Name:SID_ENTERCHAT
Direction:Client to Server
Used By:Starcraft Original, Starcraft Broodwar
Starcraft Shareware, Starcraft Japanese
Diablo Retail, Diablo Shareware
Diablo II, Diablo II Lord of Destruction
Warcraft II BNE, Warcraft III Reign of Chaos
Warcraft III The Frozen Throne
Format:

(STRING) Username
(STRING) Statstring

Remarks

Joins Chat.

Username is the account username for all products except Diablo II.

Diablo II uses the game's character name (open or closed Battle.net). This may be a bug, since Diablo II also passes the character name in the statstring.

This value is ignored by the server.

Statstring is the client's statstring.

For Diablo, the server sets the first four bytes to your product value (RHSD, LTRD) and uses the string as-is for statstrings in channels. The client sends the character statstring of the form XXXX # # # # # # # # # with the values Product Level Class Dots Strength Magic Dexterity Vitality Gold Spawned, but any string value is accepted by the server.

For Warcraft II, Starcraft, and Warcraft III, the field is empty.

For Diablo II, the field is the string Realm,CharacterName where Realm is an empty string on Open Battle.net.

This value is ignored by the server unless the client is on Diablo (DRTL/DSHR).

| Edited:
Comments
LordVader

Appears this is not always null for cdkey products, just logged this while on D2XP: ff 0a 1b 00 46 61 72 43 72 61 70 00 55 53 45 61 73 74 2c 46 61 72 43 72 61 70 00 ...FarCrap.USEast,FarCrap.

(DWORD) Protocal Header: ff 0a 1b 00 (STRING) CharacterName: 46 61 72 43 72 61 70 00 (STRING) Realm, Character: 55 53 45 61 73 74 2c 46 61 72 43 72 61 70 00

This would be logging into USEast on D2XP with the realm character "FarCrap" on my account, no account info is seen in the packet. The account in use is Boredom and it is logged into the realm character FarCrap.

1337D00D

Perhaps, but in WAR3 and W3XP its always a null five-character string with the last two bytes being "W3" (then a null char")

LordVader

Yah the extra data relates to realm characters, for only D2DV and D2XP it seems. Can you post a full log of 0x0A that contains bytes you are refering to? For both war3 and w3xp I am getting: ff 0a 06 00 00 00

Davnit

For D2 open character the statstring is also set in the same way as for realm characters (as commented above) but the value for the realm name (in the above as 'USEast') is instead just an empty string, so the value would be ',FarCrap'.

For both D2 open and D2 realm characters the 'username' field here is set to the character's name.

Davnit

If you give an empty statstring value on DRTL/DSHR the server will assign you a default one LTRD 1 0 0 30 10 20 25 0 0 (replace LTRD with RHSD for DSHR). This translates to a character that is (according to StealthBot) a Level 1 Warrior with 0 dots, 30 strength, 10 magic, 20 dexterity, 25 vitality, and 0 gold.