i have many channels in many servers...
I don't. I have a grand total of 3 channels in my favorites list.

Soooo, if this code needs to use scid/scon, I'm at a loss.
Anyway, my thought was to load the favorites in a hidden window, then filter it and use that for the joins.
I also thought when you said server, you meant network. Then I thought, heck maybe he does mean server.
If you really meant server, that would require that you organized your favorites using
the "Folder:" option to represent the servers.
So, we can filter the list by network, and/or by Folder.
I think this code would work if you only made one connection at a time, until all the channels were joined.
In any case, it ought to get you started.
; Usage: /joinfave
FolderNameon *:START:grabfave
alias grabfave {
window -hlp @Favorites
set -su0 %fvct $ini(mirc.ini,chanfolder,0)
while %fvct {
aline @Favorites $readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%fvct))
dec %fvct
}
}
alias joinfave {
set %join.net $network
set %join.foldr $1
window -hlp @Netfave
filter -cww @Favorites @Netfave $+(*,%join.net,*)
filter -cww @Netfave @Netfave $+(*,%join.foldr,*)
var %y = $filtered, %x = 1
while ( %x <= %y ) {
.timer 1 %x join $gettok($line(@Netfave,%x),1,44)
inc %x
}
window -c @Netfave
unset %join.*
}
I only 'tested' this with echo and my puny favorites list!