It's very rudimentary, but is also inclined to being flooded if someone malicious sends in a massive amount of bots to get you thrown out of the network and possibly get banned for sending too many lines of greetings too fast.
It'd be best if you considered using a timer like so:
on !*:JOIN:#:{
.timer 1 3 greeting $chan
}
alias -l greeting {
msg $1 YOUR MESSAGE HERE
}
This tells mIRC to wait about 3 seconds after a user has joined before your greetings are sent. The ! by the join event will not trigger when you (the client that runs the code) join. It'll trigger upon other people's entry only.
You can adjust the delay longer if you wish.
how do i get this to use it in one channel its doing it where ever the bots is