mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#211903 04/05/09 03:45 PM
Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Hi, I'd appreciate any help with this issue (noob at scripting).

I keep getting disconnected from some servers for excessive flood when mirc auto rejoins...many channels. I realise that I need to slow down mirc during the rejoin and hae been searching for a script.

I found the following but I can't seem to get it to work.

http://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=183920&page=0#Post183928

During the rejoin it shows "AUTOJOIN Unknown command" in the status window. Is the script faulty or something else?

TIA.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Default mIRC behaviour would not have you excess flood when joining too many channels, so...

Are you using a BNC? If so, mIRC isn't in control of your rejoins and the flooding is the fault of your bnc software.

Are you /who'ing every channel you join? This is not default mIRC behaviour but rather script behaviour. You should be throttling the /who command rather than your /joins in my opinion.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Originally Posted By: argv0
Default mIRC behaviour would not have you excess flood when joining too many channels

Options > IRC > Options > Show: Nicks on join
This is basically a /who and if you have a lot of channels (with a lot of nicknames), you WILL trigger an excess flood.

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
No BNC, just standard Mirc and without any scripts running either.

Anything I can try?

Thx.

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Originally Posted By: 5618
Originally Posted By: argv0
Default mIRC behaviour would not have you excess flood when joining too many channels

Options > IRC > Options > Show: Nicks on join
This is basically a /who and if you have a lot of channels (with a lot of nicknames), you WILL trigger an excess flood.


Just checked, I have nothing ticked on that option page.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Quote:
I found the following but I can't seem to get it to work.

http://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=183920&page=0#Post183928

During the rejoin it shows "AUTOJOIN Unknown command" in the status window. Is the script faulty or something else?

Quote:
No BNC, just standard Mirc and without any scripts running either.

Hum, the "autojoin" command was introduced in mIRC v6.17, so I think you just need to update your mIRC... Also make sure to put the script in a separate "remote scripts" file.
Here's a modified version of the script that won't evaluate channel names.
Code:
on *:disconnect: { set -e %disconnectedcids $addtok(%disconnectedcids,$cid,32) }
on *:connect:{
  if ($istok(%disconnectedcids,$cid,32)) {
    autojoin -s
    var %i = 1
    while $chan(%i) { $+(.timer,delayjoin,$cid,$chr(1),$v1) 1 $calc((%i -1) *10) join $!gettok($ctimer,2,1) | inc %i }
  }
}

This should make you rejoin each channel with a delay of 10s.

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Thanks. I just tried it but it also didn't work.

What I meant with the "AUTOJOIN Unknown command" is that it has appeared in the stautus window when I tried that script (and also your one). So it has something to do with that.

I'm using Mirc 6.16. It just reconnects to the channels (about 20+) too fast which causes the server to disconnect me for excessive flood. Also if that happens a few times after each other (mirc is set to rejoin), the server bans me. Ofcourse there's also the headaches of getting kicked from some channels cause the ops don't like seeing my nick join/disconnect 5-10 times in one go.

ATM I have disabled the "rejoin channels on disconnect" option until I an find a solution. Ofcourse having to manually rejoin channels atm is only possible if I'm in front of the screen, and it's tedious. However I don't get any excessive flood when doing it manually cause I wait a few seconds between joins (only a few secs between a line of about 8 channels each time)

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Did you try to uncheck Options > IRC > Options > Show: Nicks on join (as I sort of suggested)? This could potentially solve your problem.

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Originally Posted By: 5618
Did you try to uncheck Options > IRC > Options > Show: Nicks on join (as I sort of suggested)? This could potentially solve your problem.


Yes, as I said in an earlier post, that option is unchecked along with all the other ones on the same page.

Maybe I'm inputting the script incorrectly? I copy and paste the code into the remote script section and thnen save as ***.mrc. Is that correct? Could it be that some spaces or the copying is altering some aspect of the script code before i paste it?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
This should work for you:
Code:
on *:DISCONNECT: { 
  set -e %y #chan1,#chan2,#chan3,#chan4,#chan5,#chan6,#chan7,#chan8,#chan9,#chan10
}
on *:CONNECT: { 
  var %x = $numtok(%y,44)
  while (%x > 0) { 
    .timer 1 $calc(%x * 5) join $gettok(%y,%x,44)
    dec %x
  } 
}

All you need to do is replace #chan1,#chan2...etc..with the actual channel names that you want to rejoin. (with a comma between each added) You may add more as needed. Upon disconnection, it will set all the channels in you variables and then once you connect again, the script will join added channel with a 5-second delay in every channel joined. You can also adjust how many seconds you want to delay upon rejoining.

Joined: Jul 2006
Posts: 3,960
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,960
You need to read more carefully what have been said, someone already told you the /autojoin command was introduced in mIRC 6.17 whereas you're using mirc 6.16, just upgrade as suggested and try the script.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Originally Posted By: Tomao
This should work for you:


Thanks for that. It works but it seems like I have to leave unticked the option in mirc "rejoin channels on connect" which I'd rather not have to do. Maybe I confused the situation when I mentioned that I unticked that in a previous post, but that was only a temporary solution.

Is it possible to adjust the script and have it work with a similar delay option but still tick the option in mirc to "rejoin channels on connect" ?

TIA.

Last edited by sox147; 05/05/09 01:16 PM.
Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Originally Posted By: Wims
You need to read more carefully what have been said, someone already told you the /autojoin command was introduced in mIRC 6.17 whereas you're using mirc 6.16, just upgrade as suggested and try the script.


Yes, I may give that a try also. I passed over that cause I though this mirc already has that option (I was confused).

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Originally Posted By: Horstl
Quote:
I found the following but I can't seem to get it to work.

http://forums.mirc.com/ubbthreads.php?ubb=showflat&Number=183920&page=0#Post183928

During the rejoin it shows "AUTOJOIN Unknown command" in the status window. Is the script faulty or something else?

Quote:
No BNC, just standard Mirc and without any scripts running either.

Hum, the "autojoin" command was introduced in mIRC v6.17, so I think you just need to update your mIRC... Also make sure to put the script in a separate "remote scripts" file.
Here's a modified version of the script that won't evaluate channel names.
Code:
on *:disconnect: { set -e %disconnectedcids $addtok(%disconnectedcids,$cid,32) }
on *:connect:{
  if ($istok(%disconnectedcids,$cid,32)) {
    autojoin -s
    var %i = 1
    while $chan(%i) { $+(.timer,delayjoin,$cid,$chr(1),$v1) 1 $calc((%i -1) *10) join $!gettok($ctimer,2,1) | inc %i }
  }
}

This should make you rejoin each channel with a delay of 10s.


I've just installed 6.17 and tried your script. I no longer get the "AUTOJOIN Unknown command" but instead I get the following.

* Skipping autojoin of channels...

Despite that message above, it rejoins the channels immediately without delay. I tried changing from 10 sec up to 30 sec etc, but there's still no delay. I also tried with the option "Rejoin channels on connect" both ticked and unticked with the same result.

Any thoughts?

Thanks.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
I just tested the script, on my side it worked like I expected:
In case of disconnection and subsequent reconnect (be it a manual reconnect via the "connect" button of the toolbar, or an automated reconnect due to the "reconnect on disconection" setting ticked at options > connect > options), it joins all the channels that are "open" (that have a channel window created). The first channel per connection ID is joined immediately, the second channel after 10s, the third after 20s, and so on.

To manage the rejoin (with a custom delay) on it's own, the script will prevent the automatic rejoin - and only the automatic rejoin.
This means:
- it won't throttle joins of first-time connects/new server windows (as this is no "reconnect")
- it won't throttle join commands issued by the "perform" feature (if you have join commands in your "perform", they will be joined instantly)
- it won't throttle join commands issued by other scripts.

In case you use the perform feature to join channels so far, to delay these joins as well, you'd have to either put a delay procedure into the perform or (and preferable) you have to move these commands out of the perform and into a remote script.
Example of a remote script that will delay first-time connects as well and which includes channels previously specified in the perform:
Code:
on *:connect: {
  ; skip autojoin (for both normal connect and reconnect)
  autojoin -s

  ; "hard coded list of channels to-join" per network
  var %joinchans
  if ($network == NETWORK1) { var %joinchans = #CHAN1 #CHAN2 #CHAN3 }
  elseif ($network == ANOTHERNETWORK) { var %joinchans = #CHANA #CHANB #CHANC }

  ; add all currently open channels to the join-list as well
  var %n = 1
  while ($chan(%n)) {
    var %joinchans = $addtok(%joinchans,$v1,32)
    inc %n
  }

  ; loop the list and join channels with a 10s delay each
  var %n = 1
  while ($gettok(%joinchans,%n,32)) {
    $+(.timer,delayjoin,$cid,$chr(1),$v1) 1 $calc((%n -1) *10) join $!gettok($ctimer,2,1)
    inc %n
  }
}

The script has a big downside though: as it surpresses the dafault autojoin you won't join channels specified in Favorites and set to "join on connect". I may be able to fix this - but I don't know whether you need/use that feature at all.

Last edited by Horstl; 05/05/09 04:00 PM.
Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Thanks Horstl, your first script is working now. I don't know what I done wrong but meh, it seems to work on another server I tested just now. Thanks also for the extra script.

I don't use the favourites for joining, so I won't need that feature.

I'll have to test how long I want the delay on the main server with 20+ channels. I guess the lower the better due to the cumulative delay action.

Thanks to all for the help. I'll post back if I have any issues.

Last edited by sox147; 05/05/09 04:35 PM.
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Alright smile
For parsing the "Channel favorites" worked up a sweat and made me skip this for the moment (thhe favs are stored in mirc.ini at section [chanfolder] as comma-delimited strings where some values allow for commas inside the quoted value ("token") too, it's not using "0-values" for empty values... no way to use gettok/pos/mid, it would require some neat regex :/).

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You might want to take a look at the code I used in this snippet as it uses the chanfolder section of mIRC.ini

Joined: Aug 2007
Posts: 19
S
sox147 Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Aug 2007
Posts: 19
Ok, cool.

I'm wondering is it possible to have that delay be constant for every channel? For example, 5 sec delay before opening each channel, and not 5, 10, 15 etc.

TQ.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
That would defeat the entire purpose of the script-- the fact that you're joining too many channels at once.

I feel like it's important to ask how many channels you're actually on? I'm really not sold on excess floods being an issue with vanilla mirc in the first place.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Page 1 of 2 1 2

Link Copied to Clipboard