Code: Select all
bind notc - * verbose:procedure
proc verbose:procedure {nick uhost hand text {chan ""}} {
global botnick verbosetype verbosefile verbosewhy
set serviceverbose [lindex $text 0]; set verbose "VERBOSE"; set servicearrow [lindex $text 2]
set arrow "=>"; set user [lindex $text 1]; set channel [lindex $text 4]; putlog a
if {($chan == $botnick) || ($nick == $botnick)} { return 0 }; putlog b
if {([string equal $nick "ChanServ"]) && ([string match -nocase *$serviceverbose* $verbose]) && ([string equal $servicearrow $arrow]) && ([string match -nocase "*!*" $user]) && ([string match -nocase "*@*" $user]) && ([string match -nocase "#*" $channel])} {; putlog c
set access [lindex $text 3]; set modify [lindex $text 5]; set chan [lindex $text 4]
set from [lindex $text 1]; set nick [lindex [split $from "!"] 0]; set uhost [lindex [split $from "!"] 1]
putlog "CHANSERV VERBOSE [string toupper $chan] = $access - $modify - $chan - $from - $nick - $uhost"
set file [open $verbosefile "a"]; set time [unixtime]; set whytime [ctime $time]
set date [string trim [lindex $whytime 2]]; set month [string trim [lindex $whytime 1]]; set time [string trim [lindex $whytime 3]]
if {($verbosewhy == 1)} { puts $file "\n\[$date $month $time\] -ChanServ- $text"; catch {close $file}; putserv "PRIVMSG $chanservices :WHY $chan $nick" }
if {($verbosewhy != 1)} { puts $file "\n[$date $month $time\] -ChanServ- $text"; return 0 }
putlog "a1"
return 0
}
}
I get this error.
Code: Select all
[16:44] Tcl error [verbose:procedure]: missing close-bracket
Plus I tried the if statements with switches as well gives me the same result. Please help me.