The easiest way to do this would require each person in the channel to have the same sound (or at least a sound with the same filename). There are other more complicated methods, but I'm not sure how they would actually be done.

Here's an example of the simplest method that I could think of

Code:
 on me:*:join:#:{
if $time(HH:nn) < 09:00 || $time(HH:nn) > 17:00 {
.timer 09:00 1 1 .splay $chan Opening.wav
}
else {
.timer 17:00 1 1 .splay $chan Closing.wav
}
}

on *:waveend:{
if $filename == opening.wav {
.timer 17:00 1 1 .splay $chan Closing.wav
}
elseif $filename == closing.wav {
.timer 09:00 1 1 .splay $chan Opening.wav
}
}