This should work for you:
Code:
on *:DISCONNECT: { 
  set -e %y #chan1,#chan2,#chan3,#chan4,#chan5,#chan6,#chan7,#chan8,#chan9,#chan10
}
on *:CONNECT: { 
  var %x = $numtok(%y,44)
  while (%x > 0) { 
    .timer 1 $calc(%x * 5) join $gettok(%y,%x,44)
    dec %x
  } 
}

All you need to do is replace #chan1,#chan2...etc..with the actual channel names that you want to rejoin. (with a comma between each added) You may add more as needed. Upon disconnection, it will set all the channels in you variables and then once you connect again, the script will join added channel with a 5-second delay in every channel joined. You can also adjust how many seconds you want to delay upon rejoining.