Code:
timer 0 30 {
if ($idle) {
msg #channel I am idle
}
}


*Untested, and I just woke up, but I think it should work.