You may want to include some form of check to make sure it's not going to queue 10-20 nicks when a netsplit rejoins. Think of how that sounds...
*Net split ends ... 10 users join at once*
* Nick1 joins channel.
/splay testchannel.wav
/splay N.wav i.wav c.wav k.wav 1.wav
* Nick2 joins channel.
/splay testchannel.wav
/splay N.wav i.wav c.wav k.wav 2.wav
Consider how that will sound.
On a really large channel, it could be much worse. Having a check to make it only play sound for a maximum of one nick in a given interval (10 seconds, maybe).
Just use a variable to do it:
if (%nick.sound == $null) {
set -u10 %nick.sound 1
[color:red]your playing section of code[/color]
}
If you need help inserting that, let me know. I left it just as an example so you can try inserting it yourself... it's good practice.
One other thing... You should make sure that all letters and symbols and numbers have wav files for them. If they do not, then you may want to put an ELSE in there and play a default sound when a letter/symbol/number is missing a file. It will prevent errors. Or, just use the ELSE to skip playing any sound for those. If you need more help on how to do that, just ask.
------
EDIT:
If you really wanted to get creative and work hard on making it really "say" the nick rather than just spell it, you could basically create a script that decodes the nick and pronounces each letter based on letters surrounding it.
Example:
"ia" together should always make a "ee-uh" or "ee-ah" sound (basically you use a wav with an "ee" sound when you come to the "i" because the next letter is an "a". When you come to the "a", you look before and after and see how it should be affected.
Granted, this would take a LOT of work as there are many ways things can be pronounced and you'd have to take into account all possible ways to say a sound. It was just a comment on expanding it. I wouldn't expect it to actually be done. If you were making it say nicks in another language than English, it would be easier... English has way too many sounds for each letter. I think "a" makes something like 12 different sounds in the English (American English) language.