mIRC Homepage
Posted By: WarlockW Big Lag During Net Splits Script Issue ? - 02/10/05 02:14 PM

I am Getting BIG time lag from mirc during net splits ...

is a script issue maybe ?

I have a few of : on *:join:*:
ect in my scripts .. anyway to change them to only work
when 5 or less join at a time or something ..

need to limit it some how ?

help ?

Thanks ..
Posted By: RusselB Re: Big Lag During Net Splits Script Issue ? - 02/10/05 04:15 PM
I know I've seen something like this before, but can't recall enough details to tell you how it was done, or refer you to the appropriate topic. Try searching for JOIN FLOOD
Posted By: Lpfix5 Re: Big Lag During Net Splits Script Issue ? - 02/10/05 10:11 PM
Code:
on *:JOIN:#: {
if ($lines(join.txt) == 5) { 
timer 1 15 /remove join.txt
halt
 }
else {
write join.txt $nick
RESTOFWHATEVERSCRIPTHERE
}
}
whats wrong with variables ??
Posted By: DaveC Re: Big Lag During Net Splits Script Issue ? - 03/10/05 10:47 AM
Code:
on *:JOIN:#: {
  var %users 5
  var %seconds 15
  if (%on.join.flood.protector <= $calc(%users * %seconds)) {
    inc %on.join.flood.protector %seconds
    .timer %seconds 1 dec % $+ on.join.flood.protector
    .
    DO THE SCRIPT STUFF HERE
    .
  }
}



Max 5 users can join within 15 seconds, any more and the script takes no action.
var %users 5 sets the user count
var %seconds sets the seconds count

whats it do?
First is checks if a variable (%on.join.flood.protector) is less than or equal to "75" (5x15) which if its not then there has been more than 5 joins in the last 15 seconds.
Assuming there hasnt been then it adds 15 (seconds) to the var and sets off a timer to dec that var by 1 ever second for 15 seconds.
If it wasnt <= then dont do nothing as its the 6th join in 15 seconds
** joins beyond the 5th are not counted as joins, ie: if 5 join in 1 second, and then 13 more join 8 seconds later, 7 seconds following that, the join count is back to zero, because thats 15 seconds after the 5 joins that did count, (all others are ignored)


Simple, each time someone joins channel it adds "15" to a variable (%on.join.flood.protector)
next it sets off a timer

then if that variable is less than or quesal to "75" (5x15) then with in the last
Posted By: Lpfix5 Re: Big Lag During Net Splits Script Issue ? - 03/10/05 06:16 PM
ah nice dave
© mIRC Discussion Forums