• Welcome to Valhalla Legends Archive.
 

A "massload" question.

Started by Yegg, November 12, 2004, 02:21 PM

Previous topic - Next topic

Yegg

I just had a quick question before i have to leave. im currently making a small massload/moderation bot and when the bot detects a banned, invalid key or a username it cant connect with, when i remove that name/cdkey should i do wsBNET.Close after that and then WSBNET.Connect or would wsBNET.Close disconnect all the bots? i'll give an example.

        Case Chr(4)
            On Error Resume Next
            AddChat "Key banned!" & vbNewLine, vbRed
            Open "badkeys.txt" For Append As #1
            Print #1, "lstKeys.List(keys)"
            Close #1
            lstKeys.RemoveItem (keys)
            wsBNET.Close
            wsBNET.Connect server, "6112"


This is the code i currently have, i jus need to know if i should have the wsBNET.Close or not. if ne1 can, please giv a respone soon.

The-FooL

wsBNET.close will only close wsBNET, nothing more.

Dyndrilliac

Quote from: Yegg on November 12, 2004, 02:21 PM
I just had a quick question before i have to leave. im currently making a small massload/moderation bot and when the bot detects a banned, invalid key or a username it cant connect with, when i remove that name/cdkey should i do wsBNET.Close after that and then WSBNET.Connect or would wsBNET.Close disconnect all the bots? i'll give an example.

        Case Chr(4)
            On Error Resume Next
            AddChat "Key banned!" & vbNewLine, vbRed
            Open "badkeys.txt" For Append As #1
            Print #1, "lstKeys.List(keys)"
            Close #1
            lstKeys.RemoveItem (keys)
            wsBNET.Close
            wsBNET.Connect server, "6112"


This is the code i currently have, i jus need to know if i should have the wsBNET.Close or not. if ne1 can, please giv a respone soon.

You will be using a seperate socket for each connection. Eight bots = Eight seperate sockets, minimum.
Quote from: Edsger W. DijkstraIt is practically impossible to teach good programming to students that have had a prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.

Yegg

when u say i'd need separate sockets, how does zds bot continuously connect, wouldn't my bot do the same until it ran out of accounts/cdkeys?

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

The-FooL

If he's using MDI childs, he may not have to index the winsocks.  But then he would have to reference each form in order to close all the connections down.  But what exactly is it hes getting at?

Minux

Yegg use index and do something like this


For i = 0 To GetINI("Main", "NumBots") - 1
Load wsBNET(i)
Next i


It's been a while since I've done VB stuff but I think that hsould work for you to initialize the sockets for individual use for each cdkey/password/connection.

LivedKrad

Your question was how to close down the individual connection, right? Well, if you're indexing a winsock, (meaning you have only one parent form), then you'll need to close the socket of that individual index.

Private Sub Command1_Click()
'wsBNET(IndexOfDesiredConnection).Close
End sub

I *think* that's the code to do it, I haven't done any VB6 programming in quite some time, so that may be the incorrect procedure (syntax-wise). You may be asking however, "How do I know which specific socket to close?". Well, each time you connect with a different username/password/cdkey combination, you'll need to index that current bot's Index ID. Then, when you decide which username to disconnect, you can just reference to that bot's Indedx number and close its connection.

As in my other posts, if there are any inconsistencies and/or mistakes, let me know.