| View previous topic :: View next topic |
| Author |
Message |
rvec Voice
Joined: 04 Sep 2007 Posts: 7
|
Posted: Tue Sep 04, 2007 2:28 pm Post subject: Mel with quote addon "unmatched open brace in list" |
|
|
I am using eggdrop 1.6.18. mIRCStats Eggdrop Logger 2.0 and Random Quotes add-on for mEL 1.6.0. The quote addon is sourced after mel. I get this error message:
| Code: | [20:09] Tcl error [::mel::quote]: unmatched open brace in list
.set errorInfo
[20:10] #Rvec# set errorInfo
Currently: unmatched open brace in list
Currently: while executing
Currently: "lindex $rq_data 1"
Currently: (procedure "::mel::quote" line 17)
Currently: invoked from within
Currently: "::mel::quote $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
|
The mel script has been modified because i got the "08 error". This has been solved and mel is working for some time now.
line 17 is the second line:
| Code: | 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
} |
If needed i can put the whole script on pastebin. But the files are also downloadable here: http://sourceforge.net/projects/mel
For those reading all this, thanks for your time. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Sep 04, 2007 2:41 pm Post subject: |
|
|
Simply put, rq_data does not contain a valid list-structure, and is thus not usable with any list-commands.
The root of the problem is the file randomquote.tcl, where the author apparently does not know the difference between lists and strings, and have added some rough attempts to handle special characters, rather than implement tcl-lists properly. For this to work properly, the input files would have to be "sanitized" for any character(s) that may be part of list structures. As these are logfiles, that really is'nt an option.
The best option would be to rewrite the script to use strings and lists properly. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
rvec Voice
Joined: 04 Sep 2007 Posts: 7
|
Posted: Tue Sep 04, 2007 2:45 pm Post subject: |
|
|
| that sounds like something i can't do myself. I'll start looking for some other quote script. thanks for the help. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Sep 04, 2007 11:12 pm Post subject: |
|
|
| Not to brag, but the quote script I wrote handles tcl special chars properly, and implements pretty much every feature I could find in every other quote script (aside from "voting" for favorites) and a few new features to boot. It's in the archive under the name quotes2112 if you want to look at it. |
|
| Back to top |
|
 |
rvec Voice
Joined: 04 Sep 2007 Posts: 7
|
Posted: Wed Sep 05, 2007 10:11 am Post subject: |
|
|
ok thanks i will
But i want it to search in the logs i make with mel. So i don't know if that's possible with your script. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Sep 05, 2007 11:20 am Post subject: |
|
|
Try this script:
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=649
| Quote: |
Quote TCL 3.52 23/08/2002 stigmata
Complete quote management script with powerful features.
|
I've used it and it is a good script and it does have a search option. Well I've modified the script to fit my search criteria. I will release the modified and updated version of this script soon myself.  _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
rvec Voice
Joined: 04 Sep 2007 Posts: 7
|
Posted: Wed Sep 05, 2007 11:35 am Post subject: |
|
|
this one doesn't work like i want it to. I don't want to add quotes, I want it to return a random quote from a logfile. I think I am going to start and write it myself. It just needs to be something like:
command: !quote rvec
search for random line with <Rvec> in it.
random line found: [22:23] <Rvec> Hello everyone
return: Quote from Rvec: Hello everyone
I think I should be able to copy the "get random line from file" part from some other quote script. And i know how to do the rest. |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Wed Sep 05, 2007 11:58 am Post subject: |
|
|
Good for you, then. _________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
rvec Voice
Joined: 04 Sep 2007 Posts: 7
|
Posted: Wed Sep 05, 2007 12:35 pm Post subject: |
|
|
oops
*feels stupid*
I just searched the one by stigmata to copy the part. And I found out I can easily change the file it reads from. I only need to delete the parts to add quotes. Thanks for the help |
|
| Back to top |
|
 |
|