• Welcome to Valhalla Legends Archive.
 

[VB][Solved] Post logon sequence?

Started by Don Cullen, September 12, 2005, 02:51 PM

Previous topic - Next topic

Don Cullen

QuoteSEND -> GAME_CLIENT (0X00)        
SEND -> SID_AUTH_INFO (0x50)
RECV <- SID_PING (0x25)
RECV <- SID_AUTH_INFO (0x50)
SEND -> SID_PING (0x25) [Optional]
SEND -> SID_AUTH_CHECK (0x51)   
RECV <- SID_AUTH_CHECK (0x51)   
SEND -> SID_LOGONRESPONSE (0x29)
RECV <- SID_LOGONRESPONSE (0x29)
SEND -> SID_UDPPINGRESPONSE (0x14)
SEND -> SID_JOINCHANNEL (0x0C)

What would happen if I followed that procedure to just go directly to default channel (op Kyro[DM]), while skipping sending 0x0A and 0x0B packets? Thanks in advance for the info, and also thanks for taking the time to read this! :)

[Edit: fixed typos and changed post subject]
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'.

Blaze

You would be logged in, but you would't have entered chat or the channel.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Don Cullen

Even if i had sent SID_JOINCHANNEL (0x0C)?
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'.

Blaze

You wouldn't be able to join the channel if you weren't in chat. :P I'd assume you'd either get ipped, or the server would just ignore it.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Don Cullen

Alright, so 0x0A is mandatory... When I use 0x0A, does it takes me to the default channel (in short, BroodWar USA-1) automatically?
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'.

UserLoser.

Quote from: Kyro on September 12, 2005, 03:01 PM
Alright, so 0x0A is mandatory... When I use 0x0A, does it takes me to the default channel (in short, BroodWar USA-1) automatically?

No

Don Cullen

Alright, so the process after logon would be:

0x0A     'Enter Chat (not in channel yet)
0x0C     'Join Channel Op Kyro[DM]
0x0B     'Obtain channel list

That look about right?
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'.

UserLoser.

Quote from: Kyro on September 12, 2005, 03:26 PM
Alright, so the process after logon would be:

0x0A     'Enter Chat (not in channel yet)
0x0C     'Join Channel Op Kyro[DM]
0x0B     'Obtain channel list

That look about right?


Looks OK.  The traditional method is in the following order: 0x0a, 0x0b, 0x0c

Don Cullen

#8
Hmm, I'm confused-- according to that order (abc), it enters chat, gets channel list, THEN joins channel. Shouldn't it be acb, this way it waits til it joins channel before obtaining THAT channel's channel list?

[Edited to apologize for my own stupidity-- let that teach people everywhere- don't be like me and assume the functionality of a packet based on its name without examining the packet...]

QuoteMessage ID: 0x0B
Message Name: SID_GETCHANNELLIST 
Direction: Client -> Server (Sent)
Used By: All Products
Format:

(DWORD)       Product ID

Remarks: Requests a list of channels that the client is permitted to enter.

In the past this packet returned a product list for the specified Product ID, however, the Product ID field is now ignored -- it need not be a valid Product ID, and can be set to zero. The list of channels returned will be for the client's product, as specified during the client's logon.

My apologies- it all makes sense- proper procedure would be ABC then. Thanks for pointing out my assumption, even if you didn't mean 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'.

Kp

It looks like you've solved your main question here, but a quick explanation for the order.  SID_JOINCHANNEL has 3 subtypes.  The middle subtype (1) is used at logon to dump you in your product+country specific channel.  Codes 0 and 2 are used by the client in response to your actions (both actions via the Channel button and the act of quitting a game).  Since subtype 1 always takes you to your product specific channel, the client can send it before it learns what channels are available to it.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

l2k-Shadow

Just so you know, sending 0x0B is NOT mandatory... however the real client sends 0x0A, 0x0B, 0x0C in that order. Just sending 0x0A and 0x0C, however, will work just as well.
Quote from: replaced on November 04, 2006, 11:54 AM
I dunno wat it means, someone tell me whats ix86 and pmac?
Can someone send me a working bot source (with bnls support) to my email?  Then help me copy and paste it to my bot? ;D
Já jsem byl určenej abych tady žil,
Dával si ovar, křen a k tomu pivo pil.
Tam by ses povídaj jak prase v žitě měl,
Já nechci před nikym sednout si na prdel.

Já nejsem z USA, já nejsem z USA, já vážně nejsem z USA... a snad se proto na mě nezloběj.

Don Cullen

Cool, I'll just skip that packet then. But just for future reference, is there a way to be able to parse the code? He said to treat it like a parse stream, so how exactly would I do that? I suggested doing it via Split with the &H0 as the delimiter, but he advised against it.

So is there an example of how I would parse a stringlist?
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'.

dxoigmn

Quote from: Kyro on September 12, 2005, 11:18 PM
Cool, I'll just skip that packet then. But just for future reference, is there a way to be able to parse the code? He said to treat it like a parse stream, so how exactly would I do that? I suggested doing it via Split with the &H0 as the delimiter, but he advised against it.

So is there an example of how I would parse a stringlist?

Typically, you should have some "buffer" that is capable of removing the data types Battle.net uses. So after you received a full packet, you just pop the raw contents into this buffer. Then you can read from the buffer via various methods (.ReadWORD, .ReadDWORD, .ReadString, etc.). I'm sure if you search the forum you'll find plent of examples to work from. In the past, I have handled "string lists" by repeatedly calling .ReadString until I get an empty string.