Syntax for multiple channels are delimited by commas.
/join #chan1,#chan2,#chan3
You can also use the server command.
/server irc.site.net 6667 -j #chan1,#chan2,#chan3
You want an on join event that then joins other channels from a variable? I would suggest deciding what channels you want to join and join them all at once.
Otherwise:
/set %var #chan1,#chan2,#chan3
Or
menu channel {
Auto-Join Channel
.Add:set %var $addtok(%var,#,44)
.$iif($istok(%var,#,44),Remove) :set %var $remtok(%var,#,44)
}
on me:*:join:#:join %var