Er, no loops at all in that on connect script...
As for the lack of echoes, I was refering to the colored ones, the echo -a $server $network line was for me to see if the code was even activating and properly recognizing those two variables, forgot to remove it on pasting here.
The code itself is coming to a halt about when it hits that first if statement, as none of the others get triggered, there is no freezing of mirc. It was confirmed by someone else on IRC that they too get the same lack of those two echoes, so it's not just me ;P