| View previous topic :: View next topic |
| Author |
Message |
jlp09550 Voice
Joined: 08 Dec 2007 Posts: 6
|
Posted: Tue Jan 01, 2008 8:49 am Post subject: Netsplit Detector [SOLVED] |
|
|
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
Last edited by jlp09550 on Tue Jan 01, 2008 8:41 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Jan 01, 2008 9:19 am Post subject: |
|
|
It's simple, just change *.dal.net to whatever your network displays. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 01, 2008 7:08 pm Post subject: |
|
|
| Code: | 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
}
} |
And do as Sir_Fz stated. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
jlp09550 Voice
Joined: 08 Dec 2007 Posts: 6
|
Posted: Tue Jan 01, 2008 8:41 pm Post subject: |
|
|
| Sir_Fz wrote: | | It's simple, just change *.dal.net to whatever your network displays. |
Wow, never noticed that. Should of though.
Thanks anyways! |
|
| Back to top |
|
 |
|