Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Computing > Alt Irc Bots Eggdrop > Please, help wi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 154 of 176
Post > Topic >>

Please, help with script!

by "h3ctic" <h3ctic@[EMAIL PROTECTED] > Jun 23, 2006 at 09:55 PM

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
 




 4 Posts in Topic:
Please, help with script!
"h3ctic" <h3  2006-06-23 21:55:29 
Re: Please, help with script!
BarkerJr <jacob@[EMAIL  2006-06-24 09:41:10 
Re: Please, help with script!
"h3ctic" <h3  2006-06-26 07:21:50 
Re: Please, help with script!
"h3ctic" <h3  2006-07-05 00:31:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Aug 29 2:30:06 CDT 2008.