No-one has yet bothered to establish whether the user is looking to save favourite rooms or different rooms each time he uses IRC. If he wants a given set of rooms "save[d] somewhere" then he should use mIRC's built in favourite channels dialogue or the Perform function:

/join #Room1,#Room2,#Room3,#Room4,#Room5

That is one command which sends a total of six commands instead of ten to the server, resulting in a far less chance of being disconnected. (1 x JOIN and 5 x MODE)

If the user wants to save a different set of rooms each time then he'd then use a script and one that definitely does not contain a loop since a loop just increases what you are sending. If you'd have tested what you typed here then you'd have got cut off after joining three or four rooms.
Code:
#Joinall on
ON ME:*:JOIN:#: {
  if (# $+ $chr(44) !isin $read($server $+ .mrc)) {
    write -ci $server $+ .mrc $read($server $+ .mrc) $+ # $+ ,
  }
}
ON ME:*:PART:#: {
  write -ci $server $+ .mrc $remove($read($server $+ .mrc),# $+ $chr(44))
}
ON *:CONNECT: {
  joinall
}
alias joinall {
  if ($read($server $+ .mrc) != $null) {
    join $read($server $+ .mrc)
  }
}
#Joinall End
This is probably not perfect but it does what the user may want and won't flood him off unless he's planning on joining a fairly substantial amount of rooms. When he parts one before leaving the relevant server, that room is removed from 'memory' and is not rejoined when he logs in next. One thing to remember out of all this though is that if he has "Rejoin rooms on reconnect" enabled then it's going to work along-side any script so it would need to be turned off. /enable #joinall to turn on and /disable #joinall to turn off.

Lastly this is tested on two networks and is fully functional.

One possible modification is to change $server to $network though I am not sure whether all IRCd's support $network or not.