Quote:
Thank you DaveC ...Almost perfect smile
The devoicing works just fine, But the voicing part is kinda weird confused
Either way you proposed here, i`ve tested it. And.. the things is.. if one gets voice from the script for writing the necessary lines, and later on gets devoiced for idleing, well... when that person writes a new line (after being devoiced) it gets voiced again before writing the necessary amount of lines laugh.
If i`m a pain in the ass you`re free to kick me grin

Aa! and antoher question.. the idle used in the code.. refers to the idle on the specified channel..? or the whole thing? i mean... some users are not chatting in the chan but maybe they're having prv conversations, or on other channels.. so which one is it? blush


Doh! I looked at it and looked at it and looked at it, and couldnt see it, sent it to a friend and he tells me the fault right off


Code:
alias -l devoice.on.idle {
  if (($1 ischan) && ($me isop $1)) {
    var %i = $nick($1,0,v)
    while (%i) {
      if ($nick($1,%i,v).idle >= 3600) {
        ;^ 3600 above is 60 seconds x 60 minutes, adjust idle time as needed.
        ;
        if ($hget(textcounter. [ $+ [ $1 ] ] ,$nick($1,%i,v))) { hdel textcounter. [ $+ [ $1 ] ] $nick($1,%i,v) }
        ;
        mode $1 -v $nick($1,%i,v)
        ;
      }
      dec %i
    }
  }
}


I had the code in there, but it was using $nick, becuase I copied it out of the event code that used $nick and not $nick($1,%i,v) like this needs. Also $chan instead of $1, oh my oh my error city.
I also moved it infront of the devoice as Im not sure if the internal list of voiced users is updated when the devoice command is issued or when the user is devoiced by the server, i think it would be the serbver, but why take the risk.

$nick($1,%i,v).idle referes to the channel held in $1 which is the channel you specified when triggering the timer alias that calls this one.
So yes its only relevent to your channel.