mIRC Home    About    Download    Register    News    Help

Print Thread
Flood help #11378 16/02/03 12:32 AM
Joined: Feb 2003
Posts: 4
A
Asmoranomar Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Feb 2003
Posts: 4
I haven't scripted in a LONG time and i've just started again.
I searched the boards but i couldn't find anything relavant to my question, but if its been answered please redirect me.

When creating a popup, how do i loop thru a list of selected people and perform the operations on each one without flooding? ex: whois a list of 50+ people, or ban 50+ addresses

I cant seem to pause my code temporarly and i always end up flooding off.

Re: Flood help #11379 16/02/03 01:53 AM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
use two aliases and a timer
/whoall {
var %allnicks = $nick(#,0)
var %i = 1
while (%i <= %allnicks) {
set %whonicks %whonicks $nick(#,%i)
inc %i
}
set %nickcount $getttok(%whonicks,0,32)
var %split3 = $round($calc(%allnicks / 3),0)
.timerwhoall %split3 1 whoall2
}
/whoall2 {
if (%nickcount > 0) {
whois $nick(#,$gettok(%whoall,%nickcount,32)
dec %nickcount
whois $nick(#,$gettok(%whoall,%nickcount,32)
dec %nickcount
whois $nick(#,$gettok(%whoall,%nickcount,32)
dec %nickcount
}
else {
unset %nickcount
unset %whoall
}
}
ehh I didnt test this but it should work with little tweaking

Re: Flood help #11380 16/02/03 02:11 AM
Joined: Feb 2003
Posts: 4
A
Asmoranomar Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Feb 2003
Posts: 4
I see where your going with that, and it'll work fine for the whois case.

But how do you make a script execute say.... 5 kick cases at a time then pause for 3 sec then kick 5 more, then pause, etc.

The only reason i ask is because in your case it pauses after every step, if there was a flood or something going on you'd want to do it as fast as possible without flooding. (i know about events, im just using this as an oddball example)

Re: Flood help #11381 16/02/03 04:19 AM
Joined: Dec 2002
Posts: 145
G
gemeau50 Offline
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
What about the following:

Options / IRC / Flood
Enable "Queue: Ops commands


Re: Flood help #11382 16/02/03 04:48 AM
Joined: Feb 2003
Posts: 4
A
Asmoranomar Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Feb 2003
Posts: 4
That only helps when your script is responding to events.

What i want is triggered via popup. (and i tested it by enabling it)

Thanks for the info tho.

Re: Flood help #11383 16/02/03 05:27 PM
Joined: Feb 2003
Posts: 76
G
gerdigos Offline
Babel fish
Offline
Babel fish
G
Joined: Feb 2003
Posts: 76
Try changing the timer's parameters. For that refer to help's /timer command. I don't know if i'm right or saying nonsense, as i haven't read the code provided. smirk

Re: Flood help #11384 16/02/03 05:35 PM
Joined: Feb 2003
Posts: 4
A
Asmoranomar Offline OP
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Feb 2003
Posts: 4
This is in the help file:

"Flood protection attempts to prevent you from flooding a server with messages sent in response to requests from other users via CTCP or a script.

Flooding usually results in your being disconnected from IRC servers since they place a limit on how much information you can send at one time.

mIRC will count the number of bytes you send to a server, and will initiate a flood check if you exceed a certain maximum number of bytes."

Based on what i have experienced with the flood protection and what i have read. The flood protection only stops you from flooding when your scripts respond to events. What i'm trying to do is not an event its a popup command that is manually activated. I just want something to prevent me from flooding off when i do group kicks or whois a group of ppl.

If im wrong i'd appreciate someone helping me walk thru each option in the flood protection.