mIRC Home    About    Download    Register    News    Help

Print Thread
On connect.. (Joining MANY channels at once.) #155705 08/08/06 07:43 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
When I connect, I got this script..

(Please do not mind the number of channels, as I actually am active in them all.. and that is nother question, so take it to PM, if wondering?!)

on *:connect:{ if ($network == undernet) { join #MagicK | join #2012 | join #shaman | join #Ascetickism | join #shamanism! | join #astral_projection | join #Shamanism | join #magickcity | join #alchemy | join #filosofi | join #history | join #vulgarunicorn | join #philosophy3 | join #yoga | join #psychology | join #scripture | join #mensa | join #spirituality | join #vegan | join #ideology | join #spirits | join #spirituality | join #Shamanism | join #spirit | join #philosophy | join #dialogue | join #buddhism2 | join #buddhism | join #atheism | join #Buddha | msg x@channels.undernet.org login mynick password } }


Now, sometimes, it work as it should, and I joine all channels, one by one..

Then at other times I get this kind of error..


[08:39:39] #spiritzone Target change too fast. Please wait 94 seconds.

And like now, nothing happens, it just joine the first channel. "MagicK", then seem to "go idle" ..

Then I get:

08/08 21:27:04 * [10053] Software caused connection abort

Now..


I suspect it being that I "spam" the server, all to fast..

And if i could put a break/pauser in the code, for each 3 channels or so..

like a timer?

then I probaly would connect without problem, each and every time?

Anyone know what other it could be, if not?

And anyone know that "take a breake here" code/command?

confused

Last edited by gomp; 08/08/06 07:54 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: On connect.. (Joining MANY channels at once.) #155706 08/08/06 08:10 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
Here's a simple alias you could use when joining channels:

Code:
 alias joinchans {
  var %c = 1
  while $read(file.txt,n,%c) {
    $+(.timer,join.,$cid,.,$v1) 1 $calc(%c * 2) join $v1
    inc %c
  }
} 


write all your channels in a text file, line by line. What this will do is it will set a timer when joining each channel listed on the file.

* Change file.txt

* you can put '/joinchans' in your On connect event (replacing all those join channels that you have OR put this in the perform feature of mIRC)

So your code would look like this

Code:
 On *:CONNECT: {
 joinchans
 msg x@channels.undernet.org login mynick password
} 


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: On connect.. (Joining MANY channels at once.) #155707 08/08/06 08:30 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Thank you! smile

Last edited by gomp; 08/08/06 08:33 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: On connect.. (Joining MANY channels at once.) #155708 08/08/06 08:35 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
I still get:

#psychology Target change too fast. Please wait 70 seconds.
#scripture Target change too fast. Please wait 68 seconds.
#mensa Target change too fast. Please wait 68 seconds.
#vegan Target change too fast. Please wait 66 seconds.
#ideology Target change too fast. Please wait 63 seconds.
#spirits Target change too fast. Please wait 63 seconds.
#spirituality Target change too fast. Please wait 61 seconds.
-----
#Shamanism @Gomp
#Shamanism End of /NAMES list.
-----
#spirit Target change too fast. Please wait 55 seconds.
#philosophy Target change too fast. Please wait 55 seconds.
#dialogue Target change too fast. Please wait 55 seconds.


Though.. confused

Last edited by gomp; 08/08/06 08:36 PM.
Re: On connect.. (Joining MANY channels at once.) #155709 08/08/06 08:35 PM
Joined: Jan 2004
Posts: 1,319
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,319
Using /j #channel1,#channel2,#channel3

Would probably save the eyes and fingers some work.

Re: On connect.. (Joining MANY channels at once.) #155710 08/08/06 08:44 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
lol..

same problem happens then..


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: On connect.. (Joining MANY channels at once.) #155711 08/08/06 08:48 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
lol, owww man, I've been trying to solve this for so long now.
The error is caused because you are sending to many commands to the server in a row. Like a flood protection.

I solved it, using the following:
Code:
on *:connect:{
  if ($network == undernet) {
    .timer 1 5 join #MagicK
    .timer 1 10 join #2012
    .timer 1 15 join #shaman
    .timer 1 20 join #Ascetickism
    .timer 1 25 join #shamanism!
    .timer 1 30 join #astral_projection
    etc..........
  }
}


Then indead the problem will still occur.
To solve that:

Code:
;Target changed to fast, please try again in xxx seconds....
raw 439:*:{
  set $+(%,failedchan,.,$2) $2
  var %delay = $calc($rand(1,150) + $gettok($1-,-2,32))
  .timer 1 %delay join $+(%,failedchan,.,$2)
}

on me:*:join:#:{
  unset $+(%,failedchan,.,$chan)
}


With this second code.
It takes the RAW event, and puts the channel that you couldn't join into a variable. Then there is a timer with a delay that will keep trying to join this channel. Once you actually joined the 'failed' channel, the variable will be unset, and the timer will be halted.

Guys on this forum helped me with this solution, so I don't wanna take all credit for it.
But it's the only solution I've been able to find for it.

Good luck.

Re: On connect.. (Joining MANY channels at once.) #155712 08/08/06 09:05 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Thank you so much for doing this!




I am testing it now, and it works great!!
You are brilliant (people)! grin

Thank you! laugh

Last edited by gomp; 08/08/06 09:07 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: On connect.. (Joining MANY channels at once.) #155713 08/08/06 09:07 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Might take some time to join all the channels.
But in the end you'll get all of em.

Just get yourself a cup of coffee or summin in the meanwhile grin

Re: On connect.. (Joining MANY channels at once.) #155714 08/08/06 09:08 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Yeah! smile

I got all the time I would ever need! grin

Thank you so much for this!

Last edited by gomp; 08/08/06 09:08 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
Re: On connect.. (Joining MANY channels at once.) #155715 08/08/06 09:09 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
You can adjust the timer in the alias I gave you so it won't flood. Change "2" to any higher number you desire. smile


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: On connect.. (Joining MANY channels at once.) #155716 10/08/06 03:51 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Hey..


I got it all up and working...

using this code..

(in aliases.ini)
Code:
alias joinchans {
  var %c = 1
  while $read(file.txt,n,%c) {
    $+(.timer,join.,$cid,.,$v1) 1 $calc(%c  2) join $v1
    inc %c
  }
} 



On CONNECT {
  msg x@channels.undernet.org login Gomp mypasswordhere
} 



menu channel {
  Hide Channel Switchbar  window -ha $active
  Show Channel Switchbar  { window -w $active }
} 


menu query {
  reload logfile loadbuf $1 $+(,$sfile($logdir.log),)
}


;Target changed to fast, please try again in xxx seconds....
raw 439{
set $+(%,failedchan,.,$2) $2
var %delay = $calc($rand(1,150) + $gettok($1-,-2,32))
.timer 1 %delay join $+(%,failedchan,.,$2)
}

on mejoin#{
unset $+(%,failedchan,.,$chan)
}


on op#Ascetickism$iif($opnick == $me,.mode $chan -o $me)
  




Now, when I now want to also joine another server..

using:

/server -m irc.paranormal.se -j #torget -msg nickserv identify mypassweordhere

Then opens ALL the channels from the file.txt, also in the nev server..

which is no cool.. hehehe

Help me?

I tested using :

alias joinchans {
if ($network == undernet)
var %c = 1
while $read(file.txt,n,%c) {
$+(.timer,join.,$cid,.,$v1) 1 $calc(%c 2) join $v1
inc %c
}
}


But that did not help, ..


confused


I am willing to redo all of it BTW, so please tell em what to do from scratch if you could.

I might be mixing scripts from different helpers.


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.