• Welcome to Valhalla Legends Archive.
 

[VB] Viewing Void (Help)

Started by l2k-Shadow, August 26, 2004, 09:41 PM

Previous topic - Next topic

l2k-Shadow

I know that this topic has been already covered but I have few questions i need help with.

I am currently trying to put together a bot in VB and whenever i unsquelch someone in the void on my bot, the program freezes or (unless I use On Error Resume Next in my DataArrival sub) it throws a Run-Time Error '5'.

Is this because the winsock is overloaded with all the data it receives after the flags in The Void are re-enabled? If so, how can I make it so that it devides the data and receives it little by little.

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.

LordNevar

You shouldn't be unsquelching anyone in The Void, you should only unsquelch yourself, than bnet just does a flag update for you. Which if your "Channel" event is done properly it should list everyone after the update.

A good fortune may forbode a bad luck, which may in turn disguise a good fortune.
The greatest trick the Devil ever pulled, was convincing the world he didn't exsist.

Eli_1

Quote from: l2k-Shadow on August 26, 2004, 09:41 PM
I know that this topic has been already covered but I have few questions i need help with.

I am currently trying to put together a bot in VB and whenever i unsquelch someone in the void on my bot, the program freezes or (unless I use On Error Resume Next in my DataArrival sub) it throws a Run-Time Error '5'.

Is this because the winsock is overloaded with all the data it receives after the flags in The Void are re-enabled? If so, how can I make it so that it devides the data and receives it little by little.



It sounds like your not handling incomplete packets properly, and it's getting you stuck in an endless loop.

l2k-Shadow

Quote from: LordNevar on August 26, 2004, 10:05 PM
You shouldn't be unsquelching anyone in The Void, you should only unsquelch yourself, than bnet just does a flag update for you. Which if your "Channel" event is done properly it should list everyone after the update.

that appeared to be my exact problem, thanks very much
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.

Kp

Just a minor comment: to help protect against situations like this in the future, it's generally a good idea to have your handlers impose some basic sanity checks on the packet (like, the ID isn't above highest known ID for this product, length isn't thousands of bytes, etc.)  It won't catch all the problems, but it's pretty unlikely that a corrupt stream could still pass all the sanity checks.  For reference, the largest profile messages I've ever seen are somewhere around 400-500 bytes, iirc.  Since the individual fields are each capped at 512 bytes, it could get a lot longer if you profiled somebody who'd used a custom client to max out their data, but even then, I'd say nothing should exceed 2kb.  The exact limits you choose should depend on the protocol and expected messages, of course, but hopefully these will give you a starting point.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!