Valhalla Legends Forums Archive | Battle.net Bot Development | [c++] problem reconnecting

AuthorMessageTime
mentalCo.
i can connect to bnet just fine using sc hash. the problem is if i disconnect and try to reconnect it ip bans me for like 20 minutes. i even waited like 5 minutes before reconnecting. when using other bots they can reconnect like instantly. the way i disconnect is just closing my client. which ive also tested on other bots...

i get disconnected after receiving 0x50. and ip banned.
July 26, 2004, 11:05 PM
OnlyMeat
[quote author=mentalCo. link=board=17;threadid=7903;start=0#msg72736 date=1090883124]
i can connect to bnet just fine using sc hash. the problem is if i disconnect and try to reconnect it ip bans me for like 20 minutes. i even waited like 5 minutes before reconnecting. when using other bots they can reconnect like instantly. the way i disconnect is just closing my client. which ive also tested on other bots...

i get disconnected after receiving 0x50. and ip banned.
[/quote]

Are you sure you are not trying to reconnect using the previous session information?, maybe try and check those values and ensure they are changing accordingly.

Also try and just connect without sending any messages etc, could be you are sending something invalid.
July 26, 2004, 11:26 PM
mentalCo.
no i close the bot all together then restart it 5 minutes later. if i wait long enough i dont get ip banned. i just want to know why i have to wait that long.
July 26, 2004, 11:27 PM
OnlyMeat
Well you should be able to reconnect immediately.

You need to isolate if the problem is caused by the original connect or the reconnect i suggest connecting once with your bot then disconnecting ( without sending messages etc ) and try and connect with a real client.

Btw what client are you emulating? and how are you conneting bnls direct etc?

Did you shutdown your socket properly??
July 26, 2004, 11:32 PM
OnlyMeat
So it must be something you are sending on 0x51 post a packet log ^^
July 26, 2004, 11:43 PM
Myndfyr
Hrmm......

Are you by any chance not cleaning up all of your memory correctly, and are all of your values initialized at the start of your code?

I doubt a memory leak would be causing the problems, but depending on platform/compiler, you may be running into some issues with invalid pointers or invalid data at pointers due to not initializing them to values appropriately.
July 27, 2004, 12:02 AM
mentalCo.
[code]
closesocket(bnetfd)
[/code]
where bnetfd is my socket to bnet obviously. then connect with real client (starcraft). wont connect. i saw in a packet log of the real client it sends a disconnect packet? does anyone here use that?

edit:
i dont use bnls
July 27, 2004, 6:39 AM
mentalCo.
ok i found out whats happening. i was closing the bot without calling the closesocket function and i was getting a cdkey in use. i didnt add that support to my bot yet and it went ahead sending the rest of the packets thus getting me ip banned. lol.
July 29, 2004, 7:54 PM
ChR0NiC
[quote author=mentalCo. link=board=17;threadid=7903;start=0#msg73252 date=1091130853]
ok i found out whats happening. i was closing the bot without calling the closesocket function and i was getting a cdkey in use. i didnt add that support to my bot yet and it went ahead sending the rest of the packets thus getting me ip banned. lol.
[/quote]

Yep, that will definitely do it.
July 29, 2004, 9:40 PM

Search