by rejoin I'm guessing you mean reconnect to the server and then rejoin the channel(s) you were in
under Options (alt+o) click on the + next to connect (if the menu is explanded already it will be a -) click the Options item and make the changes to reconnect on dissconnect then scroll down to the heading IRC, click on Rejoin Channels on connect click ok