mIRC Home    About    Download    Register    News    Help

Print Thread
comments on a small script #161558 08/10/06 09:22 PM
Joined: Jul 2006
Posts: 242
H
HaleyJ Offline OP
Fjord artisan
OP Offline
Fjord artisan
H
Joined: Jul 2006
Posts: 242
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 }
  }
} 

Last edited by HaleyJ; 08/10/06 10:29 PM.

Newbie
Re: comments on a small script #161559 08/10/06 09:31 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
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

Re: comments on a small script #161560 09/10/06 10:22 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You should also put @ before the * in those events... on @*:join:#: {


Invision Support
#Invision on irc.irchighway.net