mIRC Home    About    Download    Register    News    Help

Print Thread
Big Lag During Net Splits Script Issue ? #131624 02/10/05 02:14 PM
Joined: Jan 2004
Posts: 133
W
WarlockW Offline OP
Vogon poet
OP Offline
Vogon poet
W
Joined: Jan 2004
Posts: 133

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 ..

Re: Big Lag During Net Splits Script Issue ? #131625 02/10/05 04:15 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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

Re: Big Lag During Net Splits Script Issue ? #131626 02/10/05 10:11 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Code:
on *:JOIN:#: {
if ($lines(join.txt) == 5) { 
timer 1 15 /remove join.txt
halt
 }
else {
write join.txt $nick
RESTOFWHATEVERSCRIPTHERE
}
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: Big Lag During Net Splits Script Issue ? #131627 03/10/05 09:27 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
whats wrong with variables ??


$maybe
Re: Big Lag During Net Splits Script Issue ? #131628 03/10/05 10:47 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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

Re: Big Lag During Net Splits Script Issue ? #131629 03/10/05 06:16 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
ah nice dave


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }