Since you don't know what your friend is going to type, it doesn't look like the address book will fulfill your requirements. I may be mistaken about this, as there is a regex option for the match section, but I'm not familiar with regex.
If someone that is familiar with regex can show how this can be done using regex, please post with appropriate code.
In the meantime (and in case it can't be done), you should be able to use something like
on *:text:*:#:{
if $istok(<friend's nicks space separated>,$nick,32) {
.splay <sound file>
}
}
Replace the parts in <> with the appropriate information, and remove the <>