I'm running:
Windrop 1.6.13+sharestick_cosmetic2 on CYGWIN_NT-5.0 1.3.12(0.54/3/2)
Error message:
[21:34] Tcl error [::mel::quote]: list element in braces followed by "\DJ"
instead of space
Can someone please help me figure out this error, or rather what I need to
change in the script below to avoid this error....
script start-->
bind pub - "!quote" ::mel::quote
namespace eval mel {
proc rq_fixquote {line} {
regsub -all {\[} $line {\\[} line
regsub -all {\]} $line {\\]} line
regsub -all {\"} $line {\\"} line
return $line
}
proc quote {nick host handle channel text} {
variable actives
foreach v $actives {variable $v}
if {$text == ""} {set rq_query [string tolower $nick]} else {set
rq_query
[lindex [string tolower $text] 0]}
foreach rq_nr [array names channels] { lappend rq_chanlist [string
tolower
$channels($rq_nr)] }
if {$unixnames == 1} {set rq_chan [string tolower [string range $channel
1
end]]} else {set rq_chan [string tolower $channel]}
if {[lsearch -exact $rq_chanlist [string tolower $channel]] == -1 ||
![file exists [file join $statslogdir $rq_chan].log]} {
putserv "PRIVMSG $channel : No random quote found for $rq_query!"
putlog "RandomQuote: No such channel or logfile: $channel"
return 0
}
set rq_lines -1
set rq_read [open [file join $statslogdir $rq_chan].log r]
while {![eof $rq_read]} {
set rq_data [rq_fixquote [gets $rq_read]]
if {[eof $rq_read]} {break}
if {[string match -nocase [rq_fixquote $rq_query] [string trim [lindex
$rq_data 1] <>]]} {
incr rq_lines
set rq_userlines($rq_lines) $rq_data
}
}
close $rq_read
if {$rq_lines == -1} {putserv "PRIVMSG $channel : No random quote found
for $rq_query!" ; return 0}
putserv "PRIVMSG $channel : [join $rq_userlines([rand $rq_lines])]"
array unset rq_userlines
return 0
}
}
<-- script end