• Welcome to Valhalla Legends Archive.
 

Flood Protection With CSB

Started by TriCk, May 22, 2003, 04:44 AM

Previous topic - Next topic

TriCk

Hey i'm fairly new to this... Ok
I got my bot bannin flood bots when they join but if I get a big spam like 10 rejoins it floods itself out from so many bans... How do I fix this remember I'm using CleanSlateBot.

- TriCk

Tuberload

Queue the messages, and send them using some sort of anti-flood scheme.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

Banana fanna fo fanna

This is what got most of the old-school newb chatbot developers stuck. You'll actually have to figure something out. It'll be really hard if you've been having CSB do your bitchwork for you, since oldschool chatbot developers did a lot of stuff for themselves. Good luck to you.

SUGGESTION: Collection.

Etheran

I used a listbox, back in the day~

TriCk

Ok... Well the thing i've done is when chkAutoBan is vbChecked
In the CleanSlateBot_UserJoins
Ive added the code CleanSlateBot1.Send "/ban " & username & "AutoBan"
Is there a way to make sure it doesnt flood out from sending bans though ???
Like a WAIT somehow ?

- TriCk

Noodlez

Maybe you should read the replies to your own post? Do exactly what Tuberload said.

Kp

Quote from: TriCk on May 23, 2003, 12:34 AM
Ok... Well the thing i've done is when chkAutoBan is vbChecked
In the CleanSlateBot_UserJoins
Ive added the code CleanSlateBot1.Send "/ban " & username & "AutoBan"
Is there a way to make sure it doesnt flood out from sending bans though ???
Like a WAIT somehow ?

- TriCk
Yes.  Queue the event if you've sent something recently.  I believe Tuberload mentioned this earlier.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

tA-Kane

Quote from: TriCk on May 23, 2003, 12:34 AMLike a WAIT somehow ?
The code to WAIT for someone who doesn't know how to do something by themselves:Sub Wait(Time As Integer)
 Dim Start As Integer
 'Time is the number of seconds you wish to wait for
 Start = GetTickCount()  'You'll likely need to declare GetTickCount(), I don't know the correct declare for it though.
 Do Until (GetTickCount()-Start) >= Time*60
 Loop
End Sub
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Kp

Quote from: tA-Kane on May 23, 2003, 12:50 AM
Quote from: TriCk on May 23, 2003, 12:34 AMLike a WAIT somehow ?
The code to WAIT for someone who doesn't know how to do something by themselves:Sub Wait(Time As Integer)
 Dim Start As Integer
 'Time is the number of seconds you wish to wait for
 Start = GetTickCount()  'You'll likely need to declare GetTickCount(), I don't know the correct declare for it though.
 Do Until (GetTickCount()-Start) >= Time*60
 Loop
End Sub
If you're going to do a blocking wait, wouldn't it be better to Sleep() through that time, rather than spinning the CPU checking if you've slept long enough? :p  Under Win32, Sleep takes an argument in milliseconds and should not return until at least that much time has passed.  Note that I say "at least" -- it is possible for the OS to sleep *longer* than you asked.  However, this is rarely a problem.  Sleeping instead of polling ought to free up your CPU, too.
[19:20:23] (BotNet) <[vL]Kp> Any idiot can make a bot with CSB, and many do!

tA-Kane

Quote from: Kp on May 23, 2003, 10:47 AMIf you're going to do a blocking wait, wouldn't it be better to Sleep() through that time, rather than spinning the CPU checking if you've slept long enough?

Quote from: tA-Kane on May 23, 2003, 12:50 AMThe code to WAIT for someone who doesn't know how to do something by themselves:
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com