Well, if anyone knows of one that works on networks other than DAL, then tell me.
I was hoping for a script that will announce a netsplit when one occurs on other networks besides DALNet.
Hopefully someone can make one.
Thanks,
Jared
Code: Select all
bind raw - QUIT detect:netsplit
proc detect:netsplit {from key arg} {
global netsplit_detected
if {[info exists netsplit_detected]} { return 0 }
set arg [string trimleft [stripcodes bcruag $arg] :]
if {[string equal "Quit:" [string range $arg 0 4]]} {return 0}
if {![regexp -- {^([[:alnum:][:punct:]]+)[[:space:]]([[:alnum:][:punct:]]+)$} $arg _arg server1 server2]} {return 0}
if {[string match "*.dal.net" $server1] && [string match "*.dal.net" $server2]} {
foreach chan [channels] {
putquick "NOTICE $chan :Netsplit detected: $server1 just split from $server2" -next
}
set netsplit_detected 1
utimer 20 [list do:netsplit:unlock]
}
}
proc do:netsplit:unlock {} {
global netsplit_detected
if {[info exists netsplit_detected]} {
unset netsplit_detected
}
}