I knew I'd written something like this before. Took me a bit to find it.
Code:
 on *:connect:{
  var %a = 1, %b = $ini(Auto-Join.ini,$network,0)
  while %a <= %b {
    .timer 1 $calc(10 * %a) join $readini(Auto-Join.ini,n,$network,%a)
    inc %a
  }
}
alias autojoin {
  var %a = 1, %b = $0
  while %a <= %b {
    .writeini -n Auto-Join.ini $network $gettok($1-,%a,32)
    inc %a
  }
}
 


Alias usage: /autojoin <list of channels separated by spaces>

You can keep separate lists of channels to join on a network by network basis.

If the 10 multiplier is insufficient, and I know it is on some networks, just adjust the multiplier as necessary until you find a number that works.