on *:JOIN:(mychannel): {
.timer.join.msg.nick.letters.* off
var %i = $len($nick)
while (%i) {
.timer.join.msg.nick.letters. $+ %i 1 %i msg $chan $!( $+ $upper($mid($nick,%i,1)) $+ ,)
dec %i
}
}
This well do the same, but well only do the last person to join, ignoring any it was currently doing, this well save your bacon on a netsplit, but wont really be noticed unless two people join nearly at the same time.
I also used $( X ,) to surround each letter of the nick, while its not needed here, one nick letter can cause it problems if you exapaded the script latter.