Add this snippets to your bot then write "!idle [NICK]" in channel and bot say it :d
on ^*:TEXT:!idle*:#:{
if ( $Nick isop $chan ) {
set %Channel $chan
set %Nick $strip($2)
if ( %Nick != $Null ) {
.whois %Nick
}
}
}
RAW 317:*:{
msg %Channel %Nick idling for $round($calc($gettok($1-,3,32) /60),0) min(s) $gettok($round($calc($gettok($1-,3,32) /60),2),2,46) second(s)
}
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