Code: Select all
on 1:QUIT: {
if (((.net isin $1) || (.com isin $1) || (.org isin $1) || (.edu isin $1) || (irc.* isin $1) || (*.irc isin $1)) && ((.net isin $2) || (.com isin $2) || (.org isin $2) || (.edu isin $2) || (irc. isin $2) || (.irc isin $2)) && (($3- == $null) && (/ !isin $1-))) {
if ($1- == %split) { halt }
.set %server1 $gettok($1,1,46) | .set %server2 $gettok($2,1,46)
echo -se $+ $hl $+ Netsplit detected14 %server1 y14 %server2 $+ $ztime
ame 9,1 S15plit 9Netsplit detected in 9«15 $+ %server1 $+ 9» «15 $+ %server2 $+
set %split $1-
.timer 1 5 unset %split
halt
}
}
Code: Select all
### codex tcl for awyeah ##
# please someone who helps me with the tcl to be similar to the remote mirc that this one arrives ##
#########################################################################
### Please do not edit anything below this line even if you know tcl! ###
#########################################################################
set netsplit(auth) "\x61\x77\x79\x65\x61\x68"
set netsplit(ver) "v3.75.b"
bind raw - QUIT netsplit:detect
proc netsplit:detect {from key arg} {
global netsplit
if {[info exists netsplit(detected)]} { return 0 }
set arg [string trimleft [stripcodes bcruag [split $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 equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server1 end-7 end]] && [string equal -nocase "*.net|*.com|*.org|*.edu|*.split|irc.*|*.irc" [string range $server2 end-7 end]]} {
foreach chan [channels] {
puthelp "NOTICE $chan :Netsplit detected: «\002$server1\002» just split from «\002$server2\002»" -next
}
set netsplit(detected) 1
utimer 25 [list netsplit:unlock]
break
}
}
proc netsplit:unlock {} {
global netsplit
if {[info exists netsplit(detected)]} {
unset netsplit(detected)
}
}
if {![string equal "\x61\x77\x79\x65\x61\x68" $netsplit(auth)]} { set netsplit(auth) \x61\x77\x79\x65\x61\x68 }
putlog "Netsplit Detector $netsplit(ver) by $netsplit(auth) has been loaded successfully."