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.
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
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)
What about the following:
Options / IRC / Flood
Enable "Queue: Ops commands
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.
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.
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.