Update Chanban/chanban.tcl
Use `[llength $cbans] == 0` instead of `$cbans eq ""` because of lists vs strings
This commit is contained in:
+3
-3
@@ -57,7 +57,7 @@ namespace eval cmgmt {
|
||||
|
||||
# Masks to ignore for auto adding bans
|
||||
variable noAddMasks {
|
||||
"*!*@services.network.tld"
|
||||
"*!*@services.ptirc.org"
|
||||
}
|
||||
|
||||
# ----------
|
||||
@@ -305,7 +305,7 @@ namespace eval cmgmt {
|
||||
|
||||
set cbans [banlist $chan]
|
||||
set cbans [lsearch -all -inline -not -index 1 $cbans "EXTBAN"]
|
||||
if {$cbans eq ""} {
|
||||
if {[llength $cbans] == 0} {
|
||||
putserv "PRIVMSG $chan :ERROR! ${chan}'s ban list is empty."
|
||||
return 0
|
||||
}
|
||||
@@ -615,7 +615,7 @@ namespace eval cmgmt {
|
||||
|
||||
set cbans [banlist $chan]
|
||||
set cbans [lsearch -all -inline -not -index 1 $cbans "EXTBAN"]
|
||||
if {$cbans eq ""} {
|
||||
if {[llength $cbans] == 0} {
|
||||
putserv "PRIVMSG $nick :ERROR! ${chan}'s ban list is empty."
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user