Yeah sorry dude, glitch on my part.

[14:50] * Andy has joined #tscripts
[14:50] * SladeKraven sets mode: +v Andy
[14:50] * SladeKraven sets mode: -v Andy
[14:50] <Andy> Dude, I'm present... Give me back my voice!
[14:50] * SladeKraven sets mode: +v Andy

Code:
On *:Join:[color:red]#ChannelHere[/color]: { 
  if ($nick == $me) {
    .timerAV 0 10 autovoice $chan
  }
  else {
    mode $chan +v $nick
  }
}

On me:*:Part:[color:red]#ChannelHere[/color]: { .timerAV off }
On @*:Text:*:[color:red]#ChannelHere[/color]: { 
  if ($nick isreg $chan) mode $chan +v $nick 
}

alias autovoice {
  var %x = $nick($1,0)
  while (%x) {
    if (($nick($1,%x).idle &gt;= 1200) &amp;&amp; ($nick($1,%x) != $me)) {
      if ($me isop $1) mode $v2 -v $nick($1,%x)
    }
    dec %x
  }
}


20 minutes is rather along duration to wait to see if it works decrease the number to about 20 seconds. smile

Edit: In my code above this one the errors were $chan had no value and the nickname would have been $nick($1,%x) not $nick.

-Andy

Last edited by SladeKraven; 31/08/05 08:58 PM.