When you join a channel mIRC knows of only one user, you. You have to wait till the names list has been recieved, which is Raw 366 - End of /NAMES list.
Code:
on me:*:join:#:{
inc -u99 %joined. $+ #
}
raw 366:*:{
if %joined. [ $+ [ $2 ] ] {
var %i = 1
while $nick($2,%i,ov) { echo -a $ifmatch | inc %i }
unset %joined. $+ $2
}
}