mIRC Home    About    Download    Register    News    Help

Print Thread
When servers re-join after a netsplit (on join) #9941 06/02/03 04:50 PM
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
I have a script that sets the limit of the channel by watching the joines and parts. it works great when the servers are stable, but during a netsplit and the nicks rejoin the channel, it sets the limit every time 4 nicks joins and it takes forever to get the limit back up to the right number:

-=> Joins cute-char < ~jhjkh@202.133.75.129 >
-=> Joins faraaz < ~farharayu@202.179.144.2 >
-=> Joins handkerch < ~fjzbp@62.29.49.8 >
-=> Joins _didem- < ~java@D576C8B5.kabel.telenet.be >
-=> Joins HAKAN^_^ < ~lamud@62.248.88.179 >
-=> Joins satal < ~Satal@Ottawa-HSE-ppp261079.sympatico.ca >
-
* Dingo` sets mode: +l 148
* Dingo` sets mode: +l 152
* Dingo` sets mode: +l 156
* Dingo` sets mode: +l 160

is there anything i can use to hold the script untill everyone has stop rejoining, and THEN set the limit ?

my code so far is:

Code:

#limitscript off
on *:JOIN:#beginner: {  
  if ( $network == Undernet ) &amp;&amp; ( $me isop #beginner ) {
    if (%join.count == $null) set %join.count 1      
    if (%join.count &lt; 4) { inc %join.count | halt }      
    if (%join.count == 4) { set %chan.limit $calc($nick(#,0) + 7) | mode # +l %chan.limit | unset %join.count } 
  }
}
on *:PART:#beginner: {
  if ( $network == Undernet )  &amp;&amp; ( $me isop #beginner ) {
    if (%part.count == $null) set %part.count 1
    if (%part.count &lt; 8) { inc %part.count | halt }
    if (%part.count == 8) { set %chan.limit $calc($nick(#,0) + 7) | mode # +l %chan.limit | unset %part.count }  
  }
}
#limitscript End

Re: When servers re-join after a netsplit (on join) #9942 06/02/03 05:06 PM
Joined: Dec 2002
Posts: 143
A
Aubs Offline
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
You would also need to consider QUIT and KICK as people do leave the channel by these methods (and they are not included in PART)

[edit]

Wouldn't it also be better to combine the variables?
something like %chan.limit and %chan.count

that way, when someone 8 people part and 2 people join, you wouldn't want it to set the chan limit straight away, because there's still room in the channel for people to join...

Just a suggestion!

[/edit]

Last edited by Aubs; 06/02/03 05:13 PM.

Aubs.
cool

Re: When servers re-join after a netsplit (on join) #9943 06/02/03 05:09 PM
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
heh yeah - good point smile

Re: When servers re-join after a netsplit (on join) #9944 06/02/03 08:36 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
You could always use a simple timer. Something like this:

on *:join:#channel://timerLIMIT 1 10 //mode # +l $calc($nick(#,0) +4)

This way, if a bunch of people join, the timer will reset and the limit will only be placed when the timer is allowed to finish and set the limit of # of nicknames plus 4 people. Just a thought


Those who fail history are doomed to repeat it
Re: When servers re-join after a netsplit (on join) #9945 06/02/03 09:42 PM
Joined: Feb 2003
Posts: 4
I
Ivette01 Offline
Self-satisified door
Offline
Self-satisified door
I
Joined: Feb 2003
Posts: 4
This is what I did yesterday, adding a timer, so far its been working pretty well smile, btw Dingo, ur script looks so much like mine :tongue: *lol*

Re: When servers re-join after a netsplit (on join) #9946 06/02/03 10:44 PM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
I would suggest that you simply start a timer to update the limit of the channel when you get opped on the channel. Have the timer call an alias using the channel name as a parameter and have that alias check the number of nicks in the channel and add 10 to it. You would increase the limit by 10 - say every 10 or 15 minutes - regardless of how many nicks were in the channel at the time. You might even provide a way to detect a netsplit on your network and NOT reset the limit if you have detected a netsplit condition, but just unset the netsplit variable so that the next time you go to reset the limit, the alias will go ahead and set the limit. This is not necessarily all that simple to do, since networks vary so much in how they present a netsplit.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: When servers re-join after a netsplit (on join) #9947 07/02/03 01:57 AM
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
Ohhhh Ivette01 i know that :P but I wanted to see how other people would go about doing the same thing :tongue:

Hammer i like that ides - i'll check it out smile thanks

Re: When servers re-join after a netsplit (on join) #9948 07/02/03 02:12 AM
Joined: Dec 2002
Posts: 51
D
Dingo Offline OP
Babel fish
OP Offline
Babel fish
D
Joined: Dec 2002
Posts: 51
there is one thing i'd like to know - how do i get the value of the current +L number from the channel mode ? smile

Re: When servers re-join after a netsplit (on join) #9949 07/02/03 02:44 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
$chan($chan).limit


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C