There's nothing wrong with that first on connect script from a structural point of view.
Regarding the 2nd one, while technically nothing wrong, trying to join that many channels using that method might cause the server to give a target change too fast error.
This can be avoided by using a timer to delay the joining of the channels.
I'd also like to point out that most scripters find scripts easier to read if there is a minimum number of pipes | in the code. There are times when these cannot be avoided, however, for your code, it would be a lot easier to read using multiple lines, rather than multiple posts.
Take a look at the following code, then compare it with the second one you posted in this topic and I think you'll see what I mean.
on *:connect:{
if ($network == efnet) {
.timer 1 1 join #filosofisk
.timer 1 2 join #pinehillhaints
.timer 1 3 join #utvikling
.timer 1 4 join #sms.no
.timer 1 5 join #spiritual
.timer 1 6 join #psychedelics
.timer 1 7 join #shrooms
.timer 1 8 join #MENSA
.timer 1 9 join #buddhism
.timer 1 10 join #spirituality
.timer 1 11 join #christian-discussion
.timer 1 12 join #ugdulf
.timer 1 13 join #ascension
.timer 1 14 join #archangels
.timer 1 15 join #3d_life
.timer 1 16 join #dreamt
.timer 1 17 join #rytmeboksen
.timer 1 18 join #tao
.timer 1 19 join #åndelighet
.timer 1 20 join #christian
.timer 1 21 join #Shamanism
.timer 1 22 join #Gudene
.timer 1 23 join #Truth
msg dilemma op sdfsdfsdf
msg LinuxHOW op sdffdsfsdf
}
if ($network == AccessIRC) {
server -m irc.homelien.no
msg nickserv identify sdfdfsdfsd
join #br1
server -m irc.shroomery.org
}
if ($network == Paranormal) {
join #torget
msg nickserv identify sdfdfsdf
}
if ($network == ShroomeryIRC) {
join #shroomery
msg nickserv identify sdfsdfsdf
msg nickserv identify sdfsdfsf
}
}
While it does take more lines, it won't take any longer to process.
I'd like to point out (in case I haven't done this in one of your other posts) the the Perform option located at mIRC Options - Connect - Options can be made network specific.
Timers added to delay the joining of the channels to prevent flooding.