butt when i used .addbl (too add a user) he givin me errors
well i deleted this problem by removing the [reason] [bantime] text in the bl:add proc. in the both putlog cmd's[19:17] Tcl error [bl:add]: invalid command name "reason"
Code: Select all
proc bl:add {hand idx arg} {
if {$arg == ""} { putlog "SYNTAX: \003.addbl <nick!user@host> [reason] [btime]\003"; return 0 }
if {![string match -nocase *!*@* [set blnick [lindex [split $arg] 0]]]} {
putlog "SYNTAX: \003.addbl \002<nick>\002!\002<user>\002@\002<host>\002 [reason] [bantime]\003"
return 0
}
if {[bl:do:add $hand $arg]} {
foreach chan [channels] {
if {![channel get $chan blacklist]} { continue }
foreach ubchecked [chanlist $chan] {
bl:ban $ubchecked [getchanhost $ubchecked $chan] [nick2hand $ubchecked] $chan
}
}
putlog "[string map {! \002!\002 @ \002@\002} \002$blnick\002] has been \002added\002 to the blacklist."
} {
putlog "[string map {! \002!\002 @ \002@\002} \002$blnick\002] already \002exists\002 in the blacklist."
}
}
greetz Dizzle