• Welcome to Valhalla Legends Archive.
 

[VB6] Queue / Antiflood

Started by Networks, August 27, 2004, 05:40 PM

Previous topic - Next topic

Networks

I know about the Required Delay function but It really isn't cutting it for me. It's really not as customizable at what I want. It's really not the queue that I need help with it's the processing of the queue that I need help with. Required doesn't know how many messages are in the queue nor does it reliaze when its last message was sent in order to send for example 4 messages consecutively in like 1ms  because it knows a message hasn't been sent in over 10 minutes. These are factors I would like the queue processing to take in. I need some help or examples of how I can make a very custom queue. I am currently making a moderation type bot. RequiredDelay no longer seems to work either, I drop due to flooding. Any help is really appreciated. I hope you understand what I am getting at. RequiredDelay seems to be more directed towards chatting which I can understand because it does work but it seems to have trouble with alot more messages in the queue.

BaDDBLooD

#1
Would you post the required delay function?  I Don't know what your talking about.
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

Networks

Quote from: BaDDBLooD on August 27, 2004, 06:35 PM
Would you post the required delay function?  I Don't know what your talking about.

No it's irrelavent and I you can search for it.

Blaze

Quote from: BaDDBLooD on August 27, 2004, 06:35 PM
Would you post the required delay function?  I Don't know what your talking about.

He wants to make a smart queue system. Something that works better then Adrons AntiFlood.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Networks

Quote from: Kk)Blaze(kK on August 27, 2004, 06:45 PM
Quote from: BaDDBLooD on August 27, 2004, 06:35 PM
Would you post the required delay function?  I Don't know what your talking about.

He wants to make a smart queue system. Something that works better then Adrons AntiFlood.

Definetly. :) Something that can handle and process a mutliple or even a single amount of message(s) inteligently not 1 message at each interval. Like 3-4 messages and delay for example.

The-FooL

I used a modified version of the required delay function.  I changed the constants for the sending, and adding checking not for que size(which to me is irrelevant, because que size can increase at any time), but for how many messages have been sent in the past 10-20 seconds.  If too many messages have been sent, I increase the delay.  This works extremely well, providing fast que response for short responses, and keeps the bot from dropping when it has a full que, or is busy with bans.

Networks


LordNevar

#7
My queue controls consist of 2 timers, one that activates upon loading/flooding, the other just handles actual message controls so it don't flood itsself out. Upon activating Flood/Load protection Timer #2 takes control of the bots message queues. Upon turning them off, #1 resumes to it's actual purpose of controling how messages are sent. It's actualy quite simple, but seems to get the job done. I just have a certain delay set for each timer, I don't go by message count or how long it's been since the last msg.  My queue add function is the most complicated though, and took along time to put together. No matter what timer is activated, the bot will bump whatever cmd you give it in the channel to the front of the queue, so if your doing say sweepban, but you want to change mp3's, it will execute the mp3 command than go back to what it was doing. In doing this I thought it easier to still have full functionality of your bot will it's busy accomplishing a given task. My timers auto activate and swap back and forth from what you want the bot to do, regardless of what the bots doing. Say your sweeping, and you use Mp3 cmd, it will reset the timer to #1, than reset it back to #2.

Edit: Some grammar, and a bit more detail.

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.

The-FooL

Quote from: Networks on August 28, 2004, 01:52 PM
Wow..No one has Ideas =\

You don't like ours, go get your own, and stop complaining.

Networks

Quote from: The-FooL on August 29, 2004, 04:55 PM
Quote from: Networks on August 28, 2004, 01:52 PM
Wow..No one has Ideas =\

You don't like ours, go get your own, and stop complaining.

1: I don't yours spefically because it uses requireddelay.
2: Your the only one who gave input that's why I asked. I didn't want my post to die
3: I will.

Blaze

Lord, that is a great idea... How'd you come up with the idea?
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

BaDDBLooD

Quote from: Kk)Blaze(kK on August 29, 2004, 09:39 PM
Lord, that is a great idea... How'd you come up with the idea?

He thinks?
There are only two kinds of people who are really fascinating: people who know absolutely everything, and people who know absolutely nothing.

LordNevar

Don't know just came to me as I was doing it lol.

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.

Networks

I thought about and have come up with somthing.

I'll have 2 queue types. 1 that sends consecutive messages ( 3-4 ) which will pause 1500ms between each consecutive msg. After these messages have been sent I'll calculate the amount of delay for all 3-4 messages using required delay ( with some leway) and then delay and keep doing this.

My other way is just a simple lame queue.

This can allow the 1st queue type to intiate during loads etc.

Any suggestions are appreciated.

Gangz

Quote from: Networks on August 31, 2004, 05:18 PM
I thought about and have come up with somthing.

I'll have 2 queue types. 1 that sends consecutive messages ( 3-4 ) which will pause 1500ms between each consecutive msg. After these messages have been sent I'll calculate the amount of delay for all 3-4 messages using required delay ( with some leway) and then delay and keep doing this.

My other way is just a simple lame queue.

This can allow the 1st queue type to intiate during loads etc.

Any suggestions are appreciated.

Sounds okay, but make sure you give the delay after 4 consecutive messages a pretty random delay time. Before i quit bnet i was working on how to stop flood bots and i found out that bnet has its own system of timing peoples messages and the delay given between them. if the delay is to same for so many sends it will kick you as a "flood" resulting in a muted key and possible banned key.

EX: Everyone knows about flawed bot and its own command. If it bans to many bots and has the same delay it will drop.(Some have seen this before some have never seen a load that big)