|
add a delay to rejoin on connect
#221609
25/05/10 04:15 PM
|
Joined: May 2004
Posts: 11
Dreadnought
OP
Pikka bird
|
OP
Pikka bird
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
|
|
|
Re: add a delay to rejoin on connect
[Re: Dreadnought]
#221610
25/05/10 04:41 PM
|
Joined: Oct 2003
Posts: 3,918
argv0
Hoopy frood
|
Hoopy frood
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"
|
|
|
Re: add a delay to rejoin on connect
[Re: Dreadnought]
#221749
28/05/10 06:42 PM
|
Joined: Sep 2003
Posts: 34
Ook
Ameglian cow
|
Ameglian cow
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.
|
|
|
Re: add a delay to rejoin on connect
[Re: Dreadnought]
#222402
19/06/10 12:59 AM
|
Joined: Dec 2002
Posts: 339
Doomstars
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 339 |
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?
|
|
|
Re: add a delay to rejoin on connect
[Re: Dreadnought]
#222439
19/06/10 07:26 PM
|
Joined: Apr 2010
Posts: 966
FroggieDaFrog
Hoopy frood
|
Hoopy frood
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
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.
|
|
|
Re: add a delay to rejoin on connect
[Re: FroggieDaFrog]
#222444
19/06/10 08:08 PM
|
Joined: Jul 2006
Posts: 3,881
Wims
Hoopy frood
|
Hoopy frood
Joined: Jul 2006
Posts: 3,881 |
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
|
|
|
Re: add a delay to rejoin on connect
[Re: FroggieDaFrog]
#222448
19/06/10 09:17 PM
|
Joined: Nov 2006
Posts: 1,559
Horstl
Hoopy frood
|
Hoopy frood
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...  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.
|
|
|
Re: add a delay to rejoin on connect
[Re: Horstl]
#222452
19/06/10 10:10 PM
|
Joined: Apr 2010
Posts: 966
FroggieDaFrog
Hoopy frood
|
Hoopy frood
Joined: Apr 2010
Posts: 966 |
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  Not sure why i would use ticks when mIRC will auto-name the timers if no name is specified :\ Also note that mIRC will evaluate the command part of a timer. Fixed that  Was 1/2 asleep when i decided to write it.
|
|
|
Re: add a delay to rejoin on connect
[Re: Dreadnought]
#222737
01/07/10 06:19 PM
|
Joined: Jul 2006
Posts: 248
bwuser
Fjord artisan
|
Fjord artisan
Joined: Jul 2006
Posts: 248 |
I'm using this to have ability to skip auto[re]joining (put into Perform, All networks) /if ($input(Autojoin channels?, k15vy, $$network) == $no) /autojoin -s | /else /autojoin -n
|
|
|
|
|
|