Channel rejoiner

By RusselB on Apr 06, 2008

Have you ever re-connected to a network, only to find that some of your favorite channels are in +R mode?
If, like me, you've come across this, even if you have a registered nick, mIRC's favorites folder tries to connect you to those channels whether you have identified for your nick or not.
Once you've identified for your nick, simply run this little script, and it'll connect you to all of the channels that are in your favorites.. even handles multiple networks.

This can be used from the menu system, or using the /rejoin alias. If isn't specified, then the current network will be used by default.

500 millisecond delay added to the join command for networks that are fussy regarding joining lots of channels quickly.

menu * {
  Rejoin channels
  . on $network : rejoin $network
  .on all networks : .scon -at1 rejoin $!network
}
alias rejoin {
  var %rejoin.network = $iif($1,$1,$network)
  var %a = 1, %b = $ini(mirc.ini,chanfolder,0)
  while %a <= %b {
    var %channel = $readini(mirc.ini,chanfolder,$ini(mirc.ini,chanfolder,%a))
    var %aj = $gettok(%channel,-1,44)
    var %network = $noqt($gettok(%channel,$iif(%aj isnum,-2,-1),44))
    var %channel = $noqt($gettok(%channel,1,44))
    if %network == %rejoin.network && %channel !ischan && %aj isnum {
      .timer -m 1 $calc(500 * %a) join %channel
    }
    inc %a
  }
}

Comments

Sign in to comment.
PuNkTuReD   -  Feb 11, 2009

awesome use of the ini, i expected to see a much larger code when i clicked on this one.
clear 10 from me

 Respond  
napa182   -  Apr 06, 2008

nice little snippet RusselB. works well..

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.