There are a couple of ways to do this, for instance their server Idle time can be found in a whois reply on some Networks if you use the command

/whois nick nick
The whois will create a raw reply to you wich is in the form of raw 317 , if you'd like to view raw replies you can add a line to your remotes Alt + R like the one below and it will familiarise you with what raw replies are

raw *:*: echo -a $numeric $1-

you could then add a raw 317 to your remotes
raw 317:*:{
echo -a Idle: $duration($3)
halt
}

this would show their idle time in your active window. after you /whois nick nick

If the idle time you are after is how long the person has been idle Only in a certain channel, what you are looking for is
this example
//echo -a $duration($nick(#mirc, scot).idle)
would return my channel idle time on #mIRC



Give a man a fish feed him for a day, Teach him to fish, feed him for life