Code:
alias idlemsg {
  .timeridlemsg 0 30 if ($idle > 60) { msg #channel I am idle. }
}


Put that into remotes and type /idlemsg. It will only display the message if you have been idle for at least a minute (60 seconds). To change that, change the 60. The 30 is the time between each message in seconds. You can change that as well.