Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Dynobird on August 26, 2005, 08:53 PM

Title: Quick Question: BNet newLine character
Post by: Dynobird on August 26, 2005, 08:53 PM
What char(s) does BNet send to signify a new line? I tried \n but it doesn't work =( I need to know this for parsing Strings, you see...
Title: Re: Quick Question: BNet newLine character
Post by: UserLoser. on August 26, 2005, 08:53 PM
Quote from: Dynobird on August 26, 2005, 08:53 PM
What char(s) does BNet send to signify a new line? I tried \n but it doesn't work =( I need to know this for parsing Strings, you see...

It doesn't send any
Title: Re: Quick Question: BNet newLine character
Post by: Dynobird on August 26, 2005, 09:33 PM
If it doesn't send anything, then how does it make new lines?
All I do to receive is:


while(true) {
    updateWindow.setNewText((char)in.read());
}


And on my GUI it makes new lines for every different message... even if the message doesn't fill up the GUI space horizontally.
Title: Re: Quick Question: BNet newLine character
Post by: R.a.B.B.i.T on August 26, 2005, 09:47 PM
It's called line wrapping.  Battle.net doesn't allow newlines at all.
Title: Re: Quick Question: BNet newLine character
Post by: Newby on August 27, 2005, 09:19 AM
Quote from: UserLoser on August 26, 2005, 08:53 PM
Quote from: Dynobird on August 26, 2005, 08:53 PM
What char(s) does BNet send to signify a new line? I tried \n but it doesn't work =( I need to know this for parsing Strings, you see...

It doesn't send any

It does on thet CHAT protocol IIRC.
Title: Re: Quick Question: BNet newLine character
Post by: Soul Taker on August 27, 2005, 11:46 AM
Quote from: rabbit on August 26, 2005, 09:47 PM
It's called line wrapping.  Battle.net doesn't allow newlines at all.
Profiles?
Title: Re: Quick Question: BNet newLine character
Post by: Blaze on August 27, 2005, 11:54 AM
I thought in http://bnetdocs.valhallalegends.com/content.php?Section=m&Code=17, bnet sends CrLf for a newline inside the end of the string..
Title: Re: Quick Question: BNet newLine character
Post by: Yegg on August 27, 2005, 12:25 PM
vbCrLf is also "\r\n". Not just "\n". And yes it does send that.
Title: Re: Quick Question: BNet newLine character
Post by: l2k-Shadow on August 27, 2005, 12:37 PM
If thinking outside of the CHAT protocol, no. In packet 0x0F Bnet sends the message string and you should include the CrLf by yourself... that's how the client does it anyway.
Title: Re: Quick Question: BNet newLine character
Post by: iago on August 27, 2005, 02:27 PM
Quote from: Newby on August 27, 2005, 09:19 AM
Quote from: UserLoser on August 26, 2005, 08:53 PM
Quote from: Dynobird on August 26, 2005, 08:53 PM
What char(s) does BNet send to signify a new line? I tried \n but it doesn't work =( I need to know this for parsing Strings, you see...

It doesn't send any

It does on thet CHAT protocol IIRC.

Yes, he's talking about CHAT

The question was already answered on x86's forum, so don't worry about it