napa182 commented on a Page, Simple Idle Command  -  Jul 03, 2011

well if you wanted to use the $nick(#,nick_here).idle then you could do something like this i guess...
client that is running the code needs to be +o in the chan an users need to be either +o or +h to use it
This is only an example:

on $@*:text:/^@idle\s(\S+)$/iS:#:{ 
  if (!%f && $nick(#,$nick,oh)) { inc -u5 %f
    msg # $iif($regml(1) ison #,$+($v1,'s) Idle time in # is$&
      $duration($nick(#,$v1).idle,1),Sorry $v1 is not in this room) 
  }
}

or if you want to do the whois way you could do this..
example only

on $@*:text:/^@idle\s(\S+)$/iS:#:{ 
  if (!%f && $nick(#,$nick,oh)) { set -u5 %f #
    if ($regml(1) ison #) {
      .enable #idle
      whois $v1
    }
    else { msg # Sorry but $v1 is not on this channel. }
  }
}
#idle off
raw *:*: {
  if ($numeric = 317) {
    msg %f $2's idle time is $duration($3,1) 
    haltdef
    .disable #idle
  }
  else { haltdef } 
}
#idle end
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.