Valhalla Legends Forums Archive | Battle.net Bot Development | [Solved] 0x0F SID_CHATEVENT: 0x01 and 0x07 values?

AuthorMessageTime
LockesRabb
I'd like information on the 0x0F packet- particuliarly with the 0x01 and 0x07 events (EID_SHOWUSER and EID_CHANNEL). I keep getting an error when I try to display them, it's usually due to invalid data when I try to display all values when bnet returns the 0x0F event.

So what I'm asking is: what does those two events return? I know what they are for, I just'd like to know what data would be returned with 0x0F SID_CHATEVENT, for those two specific events...

P.S. Thanks in advance for any info and for taking the time to respond! :)
September 14, 2005, 1:50 PM
Networks
I would recommend dumping the raw data recieved and then seeing what you get. Try to think logically about it. Usually for SHOWUSER, you'd get: username, flags, latency, product id and stats (there may be more *Shrug*). CHANNEL will get you the flags of the channel and the channel name. Just dump them and you may be surprised at what you get.
September 14, 2005, 1:56 PM
Myndfyr
[quote author=Kyro link=topic=12808.msg128094#msg128094 date=1126705822]
I'd like information on the 0x0F packet- particuliarly with the 0x01 and 0x07 events (EID_SHOWUSER and EID_CHANNEL). I keep getting an error when I try to display them, it's usually due to invalid data when I try to display all values when bnet returns the 0x0F event.

So what I'm asking is: what does those two events return? I know what they are for, I just'd like to know what data would be returned with 0x0F SID_CHATEVENT, for those two specific events...
[/quote]

What do you mean, "What do they return?"  I think BnetDocs more than adequately documents this message:
[pre]
(DWORD) Event ID
(DWORD) User's Flags
(DWORD) Ping
(DWORD) IP Address (Defunct)
(DWORD) Account number (Defunct)
(DWORD) Registration Authority (Defunct)
(STRING) Username
(STRING) Text
[/pre]
So, take the "IP Address," "Account number," and "Registration Authority" values away and you have all the values given.  I'm not really sure what the issue is.  For SHOWUSER, Flags tells you the user's channel flags, Ping tells you the latency of the user, Username tells you the name of the user, and Text specifies the user's statstring (which identifies the client).  The first four characters of the statstring always tells you the client -- STAR, SEXP, W2BN, etc.  Further text in the statstring serves to clarify the user's information.

For CHANNEL, Flags tells you the channel's flags (IIRC), Ping tells you your latency, Username tells you your unique username, and Text is the name of the channel.
September 14, 2005, 4:18 PM
LockesRabb
This is what I was referring to:

[quote]User Flags:

Since the game retrieves these flags automatically from the game's icon file, they are liable to change.

0x01: Blizzard Representative
0x02: Channel Operator
0x04: Speaker
0x08: Battle.net Administrator
0x10: No UDP Support
0x20: Squelched
0x40: Special Guest
0x80: This flag has not been seen, however, it is logical to assume that it was once used since it is in the middle of a sequence.
0x100: Beep Enabled (Defunct)
0x200: PGL Player (Defunct)
0x400: PGL Official (Defunct)
0x800: KBK Player (Defunct)
0x1000: WCG Official
0x2000: KBK Singles (Defunct)
0x2000: KBK Player (Defunct)
0x10000: KBK Beginner (Defunct)
0x20000: White KBK (1 bar) (Defunct)
0x100000: GF Official
0x200000: GF Player
0x2000000: PGL Player

Channel Flags:

0x01: Public Channel
0x02: Moderated
0x04: Restricted
0x08: Silent
0x10: System
0x20: Product-Specific
0x1000: Globally Accessible [/quote]

Quick question: 0x1000 = &H1, or = &H1000?

Also, here's something interesting- I do not think the channel flags as outlined in the bnetdocs are accurate as of now-- I'm getting different flags for channels. For instance, for channel op Kyro[DM], I'm getting a &H0, for channel Public Chat DMClan, I'm getting a &H1 (IIRC)-- in other words, I'm getting completely different flags. Does anyone by any perchance have an updated list of flags? Or am I obtaining the flags incorrectly?

I haven't coded handlers for the user flags, but I'll worry about that later- my primary focus as of right now is solving the winsock buffer overflow errors... :-P In any case, if you or anyone has/have an updated list of the flags, it'd be much appreciated, especially not just by me, but by Arta as well since he can then update bnetdocs.

@Networks- yeah, that's what I eventually decided to resort to. :)
September 14, 2005, 4:26 PM
Soul Taker
Well, 0x0 *is* a private channel.  And it says right there that 0x01 is a public channel, so a channel like Public Chat DMClan should have that flag.
September 14, 2005, 8:14 PM
LockesRabb
Well, apparently it doesn't.

Lemme re-load bot and find out what flag a public chat channel has: got it.

Yep, it's &H21. I just double checked. Public Chat has the flag of &H21.
September 14, 2005, 10:40 PM
Myndfyr
[quote author=Kyro link=topic=12808.msg128144#msg128144 date=1126737653]
Well, apparently it doesn't.

Lemme re-load bot and find out what flag a public chat channel has: got it.

Yep, it's &H21. I just double checked. Public Chat has the flag of &H21.
[/quote]

That means it's not only a public channel, but also product-specific.

[quote author=Kyro link=topic=12808.msg128107#msg128107 date=1126715210]
Quick question: 0x1000 = &H1, or = &H1000?
[/quote]
The latter.
September 14, 2005, 10:46 PM
LockesRabb
Huh? I just went to channel:

Public Chat DM

on asia.battle.net, so how is that product-specific?

And it sounds like you know channel flags, so mind giving examples of each channel type?
September 14, 2005, 10:51 PM
Myndfyr
[quote author=Kyro link=topic=12808.msg128147#msg128147 date=1126738268]
Huh? I just went to channel:

Public Chat DM

on asia.battle.net, so how is that product-specific?

And it sounds like you know channel flags, so mind giving examples of each channel type?
[/quote]
Well, a Battle.net sysop would be a better person to ask about why Public Chat DM is product-specific.

0x01: Public Channel - Starcraft USA-1
0x02: Moderated - Blizzard Tech Support
0x04: Restricted - Clan (xxx) when nobody from that clan is in the channel.
0x08: Silent - The Void
0x10: System - The Void
0x20: Product-Specific - Starcraft USA-1
0x1000: Globally Accessible - I don't know if this channel flag exists anymore; since there are realms now, one wonders.
September 14, 2005, 11:14 PM
LockesRabb
Oooh okay, makes sense now. How did you know &H21 was product-specific as well as public?
September 14, 2005, 11:17 PM
HdxBmx27
He he got 0x21 = prod & Public cuz 0x20 + 0x01 = 0x21
Theres no other combination of flags that will give you that.
Also, 0x = &H, &H is only used in VB I beleave. every other language used 0x to represent hex.
So whenever you see 0x jsut replace with &H and visa-versa.
so 0x0100 = &H0100 not &H0001
~-~(HDX)~-~
September 14, 2005, 11:22 PM
Networks
[quote author=HdxBmx27 link=topic=12808.msg128151#msg128151 date=1126740157]
He he got 0x21 = prod & Public cuz 0x20 + 0x01 = 0x21
Theres no other combination of flags that will give you that.
~-~(HDX)~-~
[/quote]

As you can see, channels can have multiple flags.
September 14, 2005, 11:24 PM
LockesRabb
Ahhh, makes sense now. Learned something new. Thanks everyone! :)

Now back to trying to figure out why my bot keeps emitting a winsock buffer overflow error...  Bot's useless until I get that bug fixed...
September 14, 2005, 11:26 PM
Myndfyr
To clarify terminology on "Flags":

A bitfield is a set of flags whereby each flag can represent true or false on each bit in the bitfield.  For example, the channel list:
[code]
00000000 00000000 00000000 00000001b = 0x00000001: Public Channel
00000000 00000000 00000000 00000010b = 0x00000002: Moderated
00000000 00000000 00000000 00000100b = 0x00000004: Restricted
00000000 00000000 00000000 00001000b = 0x00000008: Silent
00000000 00000000 00000000 00010000b = 0x00000010: System
00000000 00000000 00000000 00100000b = 0x00000020: Product-Specific
00000000 00000000 00010000 00000000b = 0x00001000: Globally Accessible
[/code]
Note that the suffix "b" indicates binary, and the prefix "0x" indicates hex.  Hex is used as shorthand for binary (it's WAY more convenient), and as you can see, each term has a unique bit set for it.  Thus, up to 32 "flags" can be set to true or false in a 32-bit number.
September 14, 2005, 11:38 PM
LockesRabb
Thanks for the information- interesting stuff! :)

LOL @ siggy quote!  :D
September 14, 2005, 11:41 PM
Soul Taker
[quote author=MyndFyre link=topic=12808.msg128148#msg128148 date=1126739644]
0x1000: Globally Accessible - I don't know if this channel flag exists anymore; since there are realms now, one wonders.
[/quote]
There have been globally accessible channels since Warcraft 3 has been out, so it probably still exists.  I think the WoW chat channels were globally accessible, anyone confirm?
September 15, 2005, 1:31 PM
Topaz
I'm under the impression that Blizzard Tech Support is a globally accessible channel, since I've been banned/warned for spamming on the East channel.
September 16, 2005, 4:55 AM

Search