it is giving me an unknown error, which I am unable to locate.
If you can point it out, it would be great.
Code: Select all
bind notc - * chanserv:verbose:notice
proc chanserv:verbose:notice {nick uhost hand text {chan ""}} {
global botnick verbosetype verbosechans
if {($nick == $botnick) || ($chan == $botnick)} { return 0 }
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 "a1"
if {([string equal $nick "ChanServ"]) && ([string match *$serviceverbose* $verbose]) && ([string equal $servicearrow $arrow]) && ([string match -nocase "*!*" $user]) && ([string match -nocase "*@*" $user]) && ([string match -nocase "#*" $channel])} {; putlog "a2"
set access [lindex $text 3]; set modify [lindex $text 5]; set channel [lindex $text 4]; putlog "a10"
set from [lindex $text 1]; set nick [lindex [split $from "!"] 0]; set uhost [lindex [split $from "!"] 1]; set person [lindex $text 6]; putlog "a11"
putlog "$access - $modify - $channel - $from - $nick - $uhost - $person - [getchanhost $person]"
if {($verbosetype == 1) && ($verbosechans != "") && ([string match "#*" $verbosechans])} { verbose:2 $chan $text }; putlog "a3"
if {($verbosetype == 2)} { verbose:all:chans $chan $text }; putlog "a4"
if {(($verbosetype != 1) && ($verbosetype != 2)) || ($verbosetype == 0) || ($verbosetype == "")} { return 0 }; putlog "a5"
}
}
proc verbose:2 {chan text} {
global botnick verbosefile verbosechanserv verbosewhy
set access [lindex $text 3]; set modify [lindex $text 5]; set channel [lindex $text 4]; putlog "a10"
set from [lindex $text 1]; set nick [lindex [split $from "!"] 0]; set uhost [lindex [split $from "!"] 1]; set person [lindex $text 6]; putlog "a11"
if {![file exists $verbosefile]} { set file [open $verbosefile w]; puts $file "CHANSERV VERBOSE RECORDS (ChanServ Verbose Log Script)"; catch {close $file} }; putlog 3
if {([string equal -nocase $access "unban"]) || ([string equal -nocase $access "akick"]) || ([string equal -nocase $modify "wipe"])} { return 0 }; putlog 4
if {([string equal -nocase $access "aop"]) || ([string equal -nocase $access "sop"]) || ([string equal -nocase $modify "add"]) || ([string equal -nocase $modify "del"])} {; putlog 5
if {([string equal -nocase $access "aop"])} { set type1 AOP }; if {([string equal -nocase $access "sop"])} { set type1 SOP }; putlog 6
if {([string equal -nocase $modify "add"])} { set type2 ADDED }; if {([string equal -nocase $modify "del"])} { set type2 DELETED }; putlog 7
set file [open $verbosefile "a"]; set time [unixtime]; set whytime [ctime $time]; putlog 8
set date [string trim [lindex $whytime 2]]; set month [string trim [lindex $whytime 1]]; set time [string trim [lindex $whytime 3]]; putlog 9
if {($verbosewhy == 1)} {
puts $file "\n\[$date $month $time\] -ChanServ- $text"
puts $file "\[$date $month $time\] $nick ($from) *$type2* $person to/from the $type1 list of $chan."
catch {close $file}; putserv "PRIVMSG $verbosechanserv :WHY $channel $nick"
}
if {($verbosewhy != 1)} {
puts $file "\n\[$date $month $time\] -ChanServ- $text"
return 0
}
}
}
Code: Select all
<adapter> [17:14] a1
<adapter> [17:14] a2
<adapter> [17:14] a10
<adapter> [17:14] a11
<adapter> [17:14] aop - add - #wiredpatrol - awyeah!eleet@TMnet.Jaring.Maxis.TimeNet.visualunix.net - awyeah - eleet@TMnet.Jaring.Maxis.TimeNet.visualunix.net - device - awyeah@unix.majic.org
[17:14] Tcl error [chanserv:verbose:notice]: can not find channel named "file7"
This seems to be the error
Code: Select all
<adapter> [17:14] Tcl error [chanserv:verbose:notice]: can not find channel named "file7"
logically the script looks fine to me. It is working correctly and is
writing the to text file perfectly with all the correct variables.