why be so complex about that lol... it is much simpler than all that if you want to make it for a set channel only..
on *:JOIN:#channel: {msg $chan Hi $nick and welcome to the channel }