mIRC Homepage
Posted By: Dreadnought add a delay to rejoin on connect - 25/05/10 04:15 PM
add a customizable delay (possibly random as well) to the rejoin channels on connect setting, to allow activation of various automated things (nickserv identification, mainly), and to prevent flooding for multiple, very large, channels
Posted By: argv0 Re: add a delay to rejoin on connect - 25/05/10 04:41 PM
Timers are a bad way to handle nickserv auth because you never really know the correct delay. You're better off writing a script for that and joining when you receive the event; that's much more efficient and responsive.

However, delayed join can be useful for people on large amounts of large channels, as this tends to flood them off. In that case, however, you can always use /timer in an ON CONNECT or perform tab (just not in favorites), so it's not really necessary.
Posted By: Ook Re: add a delay to rejoin on connect - 28/05/10 06:42 PM
use /autojoin -dN for a delay or /autojoin -s to skip joining until a nickserv auth is complete then /autojoin -n to join all channels.
Posted By: Doomstars Re: add a delay to rejoin on connect - 19/06/10 12:59 AM
Are we talking about delaying the join command by a given number of seconds? Or are we talking about a slight delay before joining each individual channel?
Posted By: FroggieDaFrog Re: add a delay to rejoin on connect - 19/06/10 07:26 PM
/delayjoin <start-delay> <join-delay> #chan1 [pass][,#chan2 [pass],...]
<start-delay> is the number of seconds to wait before joining channels
<join-delay> is the number of seconds to wait between channel joins

Code:
alias delayjoin {
  if ($1 !isnum || $2 !isnum || (!$3) { echo /delayjoin: invalid parameters }
  else {
    var %delay = $1
    var %x = 1
    while (%x <= $numtok($3,44)) {
      .timer 1 %delay join $!eval( $gettok($3,%x,44) ,0)
      inc %delay $2
      inc %x
    }
  }
}

changed .timer $+ $ticks to .timer
added $!eval( and ,0)
Posted By: Wims Re: add a delay to rejoin on connect - 19/06/10 08:08 PM
You should not using $ticks as a timer name, two iterations of the loop could be done without $ticks changing.
Each timer executes one command here, you don't need to name them
Posted By: Horstl Re: add a delay to rejoin on connect - 19/06/10 09:17 PM
Also note that mIRC will evaluate the command part of a timer.

Example:
/join #$me
vs
/timer 1 1 join #$me

Because #$somehting makes up a valid channel name you have to prevent this evaluation. If you don't, everything from nuisance to exploit is possible... smirk You might use a $safe() alias to prevent that evaluation.

Some time ago, I fiddled with a related request - maybe some parts are of use here as well, like the method to store the name of the channel-to-join not in the timer's command part but in its name.
Posted By: FroggieDaFrog Re: add a delay to rejoin on connect - 19/06/10 10:10 PM
Originally Posted By: Wims
You should not using $ticks as a timer name, two iterations of the loop could be done without $ticks changing.
Each timer executes one command here, you don't need to name them

Fixed that smile Not sure why i would use ticks when mIRC will auto-name the timers if no name is specified :\
Originally Posted By: Horstl
Also note that mIRC will evaluate the command part of a timer.

Fixed that smile Was 1/2 asleep when i decided to write it.
Posted By: bwuser Re: add a delay to rejoin on connect - 01/07/10 06:19 PM
I'm using this to have ability to skip auto[re]joining (put into Perform, All networks)

Code:
/if ($input(Autojoin channels?, k15vy, $$network) == $no) /autojoin -s | /else /autojoin -n 
© mIRC Discussion Forums