• Welcome to Valhalla Legends Archive.
 

[Solved] 0x0F SID_CHATEVENT: 0x01 and 0x07 values?

Started by Don Cullen, September 14, 2005, 08:50 AM

Previous topic - Next topic

Don Cullen

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! :)
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

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.

MyndFyre

Quote from: Kyro on September 14, 2005, 08:50 AM
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...

What do you mean, "What do they return?"  I think BnetDocs more than adequately documents this message:

(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

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Don Cullen

This is what I was referring to:

QuoteUser 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

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. :)
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

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.

Don Cullen

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.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

MyndFyre

Quote from: Kyro on September 14, 2005, 05:40 PM
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.

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

Quote from: Kyro on September 14, 2005, 11:26 AM
Quick question: 0x1000 = &H1, or = &H1000?
The latter.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Don Cullen

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?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

MyndFyre

Quote from: Kyro on September 14, 2005, 05:51 PM
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?
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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Don Cullen

Oooh okay, makes sense now. How did you know &H21 was product-specific as well as public?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Hdx

#10
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)~-~

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

Networks

Quote from: HdxBmx27 on September 14, 2005, 06:22 PM
He he got 0x21 = prod & Public cuz 0x20 + 0x01 = 0x21
Theres no other combination of flags that will give you that.
~-~(HDX)~-~

As you can see, channels can have multiple flags.

Don Cullen

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...
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

MyndFyre

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:

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

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Don Cullen

Thanks for the information- interesting stuff! :)

LOL @ siggy quote!  :D
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.