netsplit stop

By RoninWarrior on May 10, 2005

a small snippet that will stop you from splitting a server from a netsplit pretty simple,add to your remotes Alt+r the code does all the work nothing to turn on or off .

on ^*:quit: {
  var %split.cache, %split.server
  %split.cache = $1-
  if ($gettok($server,6,46) = $null) { %split.server = $gettok($server,4-5,46) }
  if ($gettok($server,5,46) = $null) { %split.server = $gettok($server,3-4,46) }
  if ($gettok($server,4,46) = $null) { %split.server = $gettok($server,2-3,46) }
  if (%split.server isin $1) && (%split.server isin $2) {
    .timerSPLIT -o 1 2 kernel.echosplit %split.server %split.cache
    .auser QUIT $fulladdress
    inc %split.users
    %split.chan = $comchan($nick,1)
    %split.servers = %split.server
    haltdef 
    halt
  }
  if ($group(#Kernel.Ch.Events = on)) {
    set %temp.parms $1-
    Kernel.play.all - 7[QUIT7] - 7 $nick (4 $+ $fulladdy($nick) $+ 7) has QUIT " $+ $1- $+ "
    haltdef
    halt
  }
}
on ^+QUIT:join:#: {
  %split.chan = $chan
  .timerSPLIT -o 1 1 kernel.echojoin #
  .ruser QUIT $fulladdress
  inc %split.users
  haltdef
  halt
}
alias kernel.echojoin {
  echo $colour(info2) %split.chan $timestamp Netsplit Rejoin Detected and Blocked.
  echo $colour(info2) %split.chan $timestamp $kernel.echousers(%split.users) $kernel.echosplitchan(%split.chan) 
  .timer -o 1 60 .rlevel QUIT
  .timer -o 1 60 unset %split.*
}
alias kernel.echosplit {
  echo $colour(info2) %split.chan $timestamp Netsplit Flood Detected and Blocked at:
  echo $colour(info2) %split.chan $timestamp $kernel.echospcl($2 -- $3)
  echo $colour(info2) %split.chan $timestamp $kernel.echospcl($1) $kernel.echousers(%split.users) $kernel.echosplitchan(%split.chan)
  .timer -o 1 6 unset %split.*
}
alias kernel.echospcl { return  $+ $colour(info) $+ ( $+ $1 $+  $+ $colour(info) $+ ) }
alias kernel.echousers { return  $+ $colour(info) $+ ( $+ $1 $+  $+ $colour(info) Users) }
alias kernel.echosplitchan { return  $+ $colour(info) $+ ( $+ $1 $+  $+ $colour(info) $+ ) }

Comments

Sign in to comment.
Lindrian   -  Dec 08, 2006

What will this exactley do? Prevent me from getting netsplitted?
How does that acually work ;s?
I would like some more! but it seems nice already ;).

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.