This snippet will part and rejoin all channels on ALL servers, option to specify a part message (Cycling All Channels if not specified).
To add this: Open mIRC editor (ALT + O)
Click FILE > NEW
Paste Code into new file. Click OK.
Usage:
/GHopall
or
/GHopall Message
NOTE: amended as per comments (Thanks guys / gals)
alias ghopall {
var %y = 1
while (%y <= $scid(0)) {
scon %y
var %totalchans = $chan(0)
while (%totalchans) && ($scon(%y).status == connected) {
hop -c $chan(%totalchans) $iif($1-,$1-,Cycling All Channels)
dec %totalchans
}
inc %y
}
}
I suspect, though am not positive, that the Invalid window error is being generated due to the cross usage of $scid and $scon.
Thus said, and my apologies to the owner of this script, those looking for an alternative might want to consider [url=http://www.hawkee.com/snippet/5366/]this[/url
Recommendation: Change from a while loop going through the SCID\'s, to using /scon -at1
If you connect to Network 1, Network 2, Network 3, Network 4
then disconnect from Network 2
the CID value for Network 2 is still recognized in $scid(0)
so you would try to do a /scon to a connection ID that isn\'t connected.