the bottleneck appears to be those 3 'loadspecialneeds' aliases called at the end of /config. i don't have mIRC on this machine to confirm this, but they each use the notorious '$read() loop' which is famously slow due to the fact that mIRC needs to repeatedly count lines from the beginning of the file to find the Nth line for each call to $read(). if your specialneeds*.txt files are large, the hanging is quite understandable.

change these lines:

Code:
alias loadspecialneeds {
var %q = $lines(specialneeds.txt)
if %q = 0 { return }
unset %num
:nextline
inc %num
did -a config 302 $read(specialneeds.txt,%num)
if %num < %q goto nextline
return
}
alias loadspecialneeds2 {
var %q = $lines(specialneeds2.txt)
if %q = 0 { return }
unset %num
:nextline
inc %num
did -a config 402 $read(specialneeds2.txt,%num)
if %num < %q goto nextline
return
}
alias loadspecialneedscw {
var %q = $lines(specialneedscw.txt)
if %q = 0 { return }
unset %num
:nextline
inc %num
did -a config 502 $read(specialneedscw.txt,%num)
if %num < %q goto nextline
return
}


to this:

Code:
alias loadspecialneeds loadbuf -o config 302 specialneeds.txt
alias loadspecialneeds loadbuf -o config 402 specialneeds2.txt
alias loadspecialneedscw loadbuf -o config 502 specialneedscw.txt


i have to run off now, but i'll take a look at the rest of it later


"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde