mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2004
Posts: 133
W
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 ..

Joined: Aug 2004
Posts: 7,252
R
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

Joined: Aug 2005
Posts: 1,052
L
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* }
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
whats wrong with variables ??


$maybe
Joined: Sep 2003
Posts: 4,230
D
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

Joined: Aug 2005
Posts: 1,052
L
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* }

Link Copied to Clipboard