mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Ok, I'm trying to get a script, that will solve the "Cannot join channel, target change to fast" problem.

Raw 439 is actually triggered when this happens.
$2 is the channel that couldnt be joined.

With this, it should be possible to write the channel to a variable, like %failedchan-channame
The channame has to change obviously.

raw 439:*Target change too fast*:{
set %failedchan- $+ $2
}

Then when the connect is done, I want a timer, that will search for this variable, and if it exist, join the channel that couldnt be joined before.

Can anyone help me with this please?

Joined: Jul 2006
Posts: 53
O
Babel fish
Offline
Babel fish
O
Joined: Jul 2006
Posts: 53
does the server tell you how long you must wait until you can rejoin ?

Last edited by oblivious; 16/07/06 03:09 AM.
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
That information is passed as part of the information retruned by the raw.

Code:
 raw 439:*:{
set %faliedchan $2
.timer 1 $gettok($1-,-2,32) join %failedchan
}
 

Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Yes, all the information is passed in the raw indead.
But how can I include the channel name in the variable name?

I expect a problem with multiple channels.

like:
set %failedchan.#channel1

And if it occurs again:
set %failedchan.#channel2

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
raw 439:*:{
  set %failedchan $addtok(%failedchan,$2,44)
  .timer 1 $gettok($1-,-2,32) join %failedchan
}
on me:*:join:#:{
  set %failedchan $remtok(%failedchan,$chan,1,44)
}
  


Please note that this is untested.

Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Alright I'm gonna play with this a bit.
Thanks RusselB.

One question though, could you please help with it as well?
How would I create a variable that contains the name of $2.

Like: set (%failedchan- $+ $2) $2
Imagine failed channel name is #test

So, that it would create a variable with the name:
%failedchan-#test
with value: #test

Does anyone know? I need this very often, so I would like to learn it.
Thanks in advance

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You've got the right idea, and, I think, even a format that would work.
Personally when needing something like that, I use this format:
set $+(%,failedchan,.,$2) $2

Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Hmmm, alright so you say $+() combines the tokens (seperated by commas) into 1 string.

Alright, awesome.
Thank you once again smile

Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Thx for that script RusselB.
Today finally had time to fully test it, and didnt work good.

The timer, takes the delay from the RAW message.
In theory this should work, but in practise not. It's to fast.

When you try to fast, the time that you need wait will increase. So instead of having to wait 3 seconds, it actually ended up with like 85 timers, all trying to join over and over again.... grin

Fixed it easily though, just modied one of your lines:
.timer 1 180 join %failedchan

Gave the timer a 3 minutes delay, which should always be long enough, and solved my problems smile

Thanks again!


Link Copied to Clipboard