Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock]
}
return 0
}
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set chan [string tolower $chan]
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock($chan) 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock($chan)]
}
return 0
}
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock]
}
return 0
}
While for...Tcl: syntax error in expression "(![info exists netsplit_lock]) && ([lsearch -exact $checkmod"
Tcl: ("if" test expression)
Tcl: while compiling
Tcl: "if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string m..."
Tcl: (compiling body of proc "netsplit:lock", line 4)
Tcl: invoked from within
Tcl: "netsplit:lock $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
Code: Select all
bind sign - * netsplit:lock
proc netsplit:lock {nick uhost hand chan text {reason ""}} {
global botnick netsplit_lock
set chan [string tolower $chan]
set checkmode [string trim [lindex [split [getchanmode $chan]] 0] "+"]
if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
putquick "MODE $chan +m" -next; set netsplit_lock($chan) 1
putquick "NOTICE $chan :Netsplit detected, channel set to +m for 10 secs. ;)" -next
utimer 10 [list putquick "MODE $chan -m" -next]
utimer 15 [list unset netsplit_lock($chan)]
}
return 0
}
Tcl: syntax error in expression "(![info exists netsplit_lock($chan)]) && ([lsearch -exact $c"
Tcl: ("if" test expression)
Tcl: while compiling
Tcl: "if {(![info exists netsplit_lock($chan)]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([s..."
Tcl: (compiling body of proc "netsplit:lock", line 5)
Tcl: invoked from within
Tcl: "netsplit:lock $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
should be([llength $reason] == 2])
Code: Select all
[llength $reason]==2
user wrote:should be([llength $reason] == 2])I guessCode: Select all
[llength $reason]==2
Changed for both code, but however, although it doesn't appear any error message now, it still doesn't work when there's a netsplit going on.Alchera wrote:Stealthx: Just do as user suggested.
user wrote:should be([llength $reason] == 2])I guessCode: Select all
[llength $reason]==2
Code: Select all
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match "*.*.galaxynet.org" [lindex $reason 0]]) && ([string match "*.*.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2]) && ([lindex $reason 2] == "")} {
Code: Select all
if {(![info exists netsplit_lock]) && ([lsearch -exact $checkmode "m"] == -1) && ([string match -nocase "*.??.galaxynet.org" [lindex $reason 0]]) && ([string match -nocase "*.??.galaxynet.org" [lindex $reason 1]]) && ([llength $reason] == 2)} {