mIRC Home    About    Download    Register    News    Help

Print Thread
#114740 17/03/05 09:31 AM
Joined: Mar 2005
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2005
Posts: 8
hmm, well.. i want to do.. when a netsplit comes it fetch one/more names into a speciel var, and when they come back it unset/delete the var.. so i have a %var under the whole netsplit so i can do different things. I would be glad if someone would help me out.

thanks

Joined: Mar 2005
Posts: 212
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Mar 2005
Posts: 212
fetch a few names
could you be more specific
what will this be used for

Joined: Mar 2005
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2005
Posts: 8
Quote:
fetch a few names
could you be more specific
what will this be used for


well, normaly i have something that check if more than 4 users join very fast and so.. but they will do that when then come back fomr the netsplit.. i need something to avoid that

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
well most ircd's and networks prefix quits with Quit: so a netsplit wont have that. So you should check quit messages for something like
on *:quit: { if (*.*.* isin $1) && (*.*.* isin $2) { do stuff } }

Joined: Mar 2005
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2005
Posts: 8
Quote:
well most ircd's and networks prefix quits with Quit: so a netsplit wont have that. So you should check quit messages for something like
on *:quit: { if (*.*.* isin $1) && (*.*.* isin $2) { do stuff } }


ah, but im really still lost how i can make it

Joined: Mar 2004
Posts: 540
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
whoops forgot you would want to check if Quit: isnt in that also

Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
When you are using wildcards, the proper function is iswm not isin. Try something like this:

Code:
on *:QUIT: {
  if (!$3) && ($wildtok($1-,*.*.*,0,32) == 2) {
    set $+(%,netsplit.,$network) $addtok($($+(%,netsplit.,$network),2),$nick,32)
  }
}
on *:JOIN:#: {
  if ($istok($+(%,netsplit.,$network),$nick,32)) {
    set $+(%,netsplit.,$network) $remtok($($+(%,netsplit.,$network),2),$nick,1,32)
  }
}

Note that there is no way of telling when the servers are connected back together. The on JOIN event searches for their nickname but users can easily change them during the netsplit.


- Relinsquish
Joined: Mar 2005
Posts: 8
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2005
Posts: 8
ossent that try to take all nicks? i just want some simple to say if there still is netsplit

Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
I can't guarantee for complete accuracy but try this:

Code:
on *:QUIT: {
  if (!$3) && ($wildtok($1-,*.*.*,0,32) == 2) {
    set $+(%,netsplit.,$network) $addtok($($+(%,netsplit.,$network),2),$nick,32)
    if ($numtok($($+(%,netsplit.,$network),32) == 1) {
      amsg There is a netsplit detected between $1 and $2
    }
  }
}
on *:JOIN:#: {
  if ($istok($+(%,netsplit.,$network),$nick,32)) {
    unset $+(%,netsplit.,$network) $remtok($($+(%,netsplit.,$network),2),$nick,1,32)
    amsg There is no longer a netsplit.
  }
}


- Relinsquish
Joined: Feb 2005
Posts: 7
Y
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Y
Joined: Feb 2005
Posts: 7
i didn't realize netsplits still happen, i thought that was a thing from MSN years ago


<33 irc.msn.com:6667 I miss you


~YB


Link Copied to Clipboard