If the previous suggestions aren't what you need, then maybe this is:
If you want to have something happen when the file has
finished playing to some nick, then you can use the onPLAYEND event.
on *:PLAYEND:{
echo -s Finished playing $filename to $nick
}
-genius_at_work