Quote:

Using checkidle method is not effective in this case as if a user is active on another channel, the idle time does not count.


Why? There'd be 2 different idles, one for your channel and one for the other channel they are active in.

Code:
on @*:join:#myroom:{
  $+(.timer,$nick) 0 30 idlecheck $nick $chan
}
alias idlecheck {
  if ($nick($2,$1).idle > 300) {
    kick $2 $1 Don't idle.
    $+(.timer,$nick) off
  }
}