# splitdetect.tcl for netbots.tcl v3.15
# designed to work with eggdrop 1.5.2 or higher
# Johoho's Eggdrop Page - http://johoho.eggdrop.cx
# splitdetect.tcl copyright (c) 1999,2000 by johoho <johoho@hojo-net.de>
# netbots.tcl copyright (c) 1998-2000 by slennox <slennox@egghelp.org>

## splitdetect.tcl component script v2.01.1, 19.03.2000 ##

# History:
# 
# v1.00.1, 26.12.1999 - initial release, not public
# v2.01.0, 14.01.2000 - public release with some fixed
# v2.01.1, 19.03.2000 - changed header and readme :)

# thanks to G'Quann who coded this one. thanks slennox for netbots.tcl

Please note that this component is fully compatible with netbots.tcl v. 3.00 - 3.10 by slennox

This script joins channel &servers and listens for netsplits. A lsit of current netsplits can be accessed in partyline. After a set time netsplits are marked as critical, since people can nick-collide and take server op via the other server.
This script might be useless on TS networks.

#### DCC commands (channel/global +m users)
.netsplits to show all current netsplits

#### Installation
To install this component properly you have to copy it to your netbots directory and add these lines to your netset.tcl conf:

## netset.tcl
# splitdetect.tcl
set nb_component(splitdetect) 1
set sd_criticaltime 29
set sd_lost 1440
set sd_ignore "rlinks.tu-ilmenau.de"
set sd_showall 1


## Settings Documentation:

sd_criticaltime  (default: 29)
  how long does a server has to splitted before considered as critical? (in seconds)
  Valid settings: 0 to infinite.

sd_lost  (default: 1440)
  after how many seconds a splittet server should be marked as lost? (in seconds)
  Valid settings: 0 to infinite.

sd_ignore  (default: "rlinks.tu-ilmenau.de")
  which servers should be ignored in netsplit watch? (enter test servers here)
  Valid settings: "" or a list of servers.

sd_showall  (default: 1)
  This setting defines if all splitts should be shown or just the critical ones in partyline output.
  Valid settings: 0 or 1.
