mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 11
D
Pikka bird
OP Offline
Pikka bird
D
Joined: May 2004
Posts: 11
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

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Sep 2003
Posts: 34
O
Ook Offline
Ameglian cow
Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 34
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.

Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
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?

Joined: Apr 2010
Posts: 966
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 966
/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)

Last edited by FroggieDaFrog; 19/06/10 09:56 PM.

I am SReject
My Stuff
Joined: Jul 2006
Posts: 3,962
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,962
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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

Joined: Apr 2010
Posts: 966
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 966
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.


I am SReject
My Stuff
Joined: Jul 2006
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
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 


Link Copied to Clipboard