I just tested the script, on my side it worked like I expected:
In case of disconnection and subsequent reconnect (be it a manual reconnect via the "connect" button of the toolbar, or an automated reconnect due to the "reconnect on disconection" setting ticked at options > connect > options), it joins all the channels that are "open" (that have a channel window created). The first channel per connection ID is joined immediately, the second channel after 10s, the third after 20s, and so on.
To manage the rejoin (with a custom delay) on it's own, the script will prevent the automatic rejoin - and only the
automatic rejoin.
This means:
- it won't throttle joins of first-time connects/new server windows (as this is no "reconnect")
- it won't throttle join commands issued by the "perform" feature (if you have join commands in your "perform", they will be joined instantly)
- it won't throttle join commands issued by other scripts.
In case you use the perform feature to join channels so far, to delay these joins as well, you'd have to either put a delay procedure into the perform or (and preferable) you have to move these commands out of the perform and into a remote script.
Example of a remote script that will delay first-time connects as well and which includes channels previously specified in the perform:
on *:connect: {
; skip autojoin (for both normal connect and reconnect)
autojoin -s
; "hard coded list of channels to-join" per network
var %joinchans
if ($network == NETWORK1) { var %joinchans = #CHAN1 #CHAN2 #CHAN3 }
elseif ($network == ANOTHERNETWORK) { var %joinchans = #CHANA #CHANB #CHANC }
; add all currently open channels to the join-list as well
var %n = 1
while ($chan(%n)) {
var %joinchans = $addtok(%joinchans,$v1,32)
inc %n
}
; loop the list and join channels with a 10s delay each
var %n = 1
while ($gettok(%joinchans,%n,32)) {
$+(.timer,delayjoin,$cid,$chr(1),$v1) 1 $calc((%n -1) *10) join $!gettok($ctimer,2,1)
inc %n
}
}
The script has a big downside though: as it surpresses the dafault autojoin you won't join channels specified in
Favorites and set to "join on connect". I may be able to fix this - but I don't know whether you need/use that feature at all.