You'd have to loop each one through all of the open channels. So you'd need to run each one through an alias that does that.
For one network connection, that's pretty easy:
alias idlemsg {
.timeridlemsg1 0 3600 if ($idle > 300) { MsgChans 3I am currently joining the ranks of being an Idle Chat User! 7 Say my name if you need me. :) }
.timeridlemsg2 0 3600 if ($idle > 1200) { MsgChans 3I have joined the ranks of being an Idle Chat User! 7 Say my name if you need me. :) }
.timeridlemsg3 0 3600 if ($idle > 2400) { MsgChans 3I am still an Idle Chat User! 7 Give up saying my name! 5Please leave me a message! :) }
.timeridlemsg4 0 3600 if ($idle > 3600) { MsgChans 3I've been an Idle Chat User for an hour now! 7 Give up saying my name! 5Please leave me a message! :) }
}
alias MsgChans {
var %cnt = 1
while (%cnt <= $chan(0)) {
msg $chan(%cnt) $1-
inc %cnt
}
}
For multiple connections, you'd need to use /scon. Since I'm not that good at using it (I don't ever need it for my own scripts), I'll leave it for someone else to show how to loop through multiple networks with it.
Of course, the simple way for it to work in multiple networks would be to call the idle alias on all networks. You'd just need to remove the timer names or else tack on the network/server name to the timer name because you can't have 2 timers running with the same name.