Nice work, lillaiwazz. But I think it may need a little flood check so that you won't get flooded in a channel where heavy traffic persists:
on !*:JOIN:#YourChannel:inc -u3 %x | $iif(%x > 5,return,.msg $chan $+(Hi,$chr(32),$nick,$chr(44),$chr(32),welcome to,$chr(3),04,$chan))
And ! in front the onjoin event is your friend so you don't send a greeting to yourself.