mIRC Home    About    Download    Register    News    Help

Print Thread
netsplit thingie for a bot #114740 17/03/05 09:31 AM
Joined: Mar 2005
Posts: 8
C
CreazioN Offline OP
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

Re: netsplit thingie for a bot #114741 17/03/05 10:25 AM
Joined: Mar 2005
Posts: 212
N
NeUtRoN_StaR Offline
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

Re: netsplit thingie for a bot #114742 17/03/05 10:34 AM
Joined: Mar 2005
Posts: 8
C
CreazioN Offline OP
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

Re: netsplit thingie for a bot #114743 17/03/05 11:11 AM
Joined: Mar 2004
Posts: 540
A
Armada Offline
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 } }

Re: netsplit thingie for a bot #114744 17/03/05 12:08 PM
Joined: Mar 2005
Posts: 8
C
CreazioN Offline OP
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

Re: netsplit thingie for a bot #114745 17/03/05 01:29 PM
Joined: Mar 2004
Posts: 540
A
Armada Offline
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
whoops forgot you would want to check if Quit: isnt in that also

Re: netsplit thingie for a bot #114746 17/03/05 02:10 PM
Joined: Mar 2004
Posts: 175
Relinsquish Offline
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
Re: netsplit thingie for a bot #114747 18/03/05 12:10 PM
Joined: Mar 2005
Posts: 8
C
CreazioN Offline OP
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

Re: netsplit thingie for a bot #114748 18/03/05 03:16 PM
Joined: Mar 2004
Posts: 175
Relinsquish Offline
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
Re: netsplit thingie for a bot #114749 18/03/05 03:43 PM
Joined: Feb 2005
Posts: 7
Y
YBNORML Offline
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