In the mIRC options dialog click the + next to Connect on the left and select Perform, check the "Enable perform on connect" box on the right and add /j #channelname to the text box below.