mIRC Homepage
Posted By: HaleyJ comments on a small script - 08/10/06 09:22 PM
Hi
can anyone improve the code below and any suggestions will be much appreciated
thanks

Code:
 #limit on
ON *@:JOIN:#test: {
  set -u4 %limitcheck. [ $+ [ $wildsite ] ]
  timer_preventbotflood 1 8 /mode $chan +l $calc($nick($chan,0)+5))
}
ON *@:PART:#test: {
  if (%limitcheck. [ $+ [ $wildsite ] ] == $null) {
    timer 1 3 /limit $chan $nick
  }
}
ON *@:KICK:#test: {
  timer_kickcheck 1 8 /limit $chan $knick
}
ON *:QUIT: {
  if ($me ison #test) {
    timer_quitcheck 1 8 /limit #test $nick
  }
}
alias limit {
  if ($2 !ison $1) {
    mode $1 +l $calc($nick($1,0)+5)) 
  }
}
#limit end

on *:TEXT:!limit*:#: {
  if ($istok(%master,$fulladdress,32)) {
    if ($2 == on) {  enable #limit | mode $chan +l $calc($nick($chan,0)+5)) }
    if ($2 == off) { disable #limit | mode $chan -l }
  }
} 
Posted By: OrionsBelt Re: comments on a small script - 08/10/06 09:31 PM
I can think of only 1 comment in your
Code:
ON *:QUIT: {
  if ($me ison #test) {
    timer_quitcheck 1 8 [color:red]/[/color]limit $nick $chan
  }
}

There is no need for those slashes in scripts.
Never laugh

Oww, and you could silence the timers that you use, by adding a . in front of them. If you want that ofc.

I bet there are other things, but this is my input wink
Posted By: Riamus2 Re: comments on a small script - 09/10/06 10:22 PM
You should also put @ before the * in those events... on @*:join:#: {
© mIRC Discussion Forums