This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Mel with quote addon "unmatched open brace in list"

Support & discussion of released scripts, and announcements of new releases.
Post Reply
r
rvec
Voice
Posts: 7
Joined: Tue Sep 04, 2007 2:18 pm

Mel with quote addon "unmatched open brace in list"

Post by rvec »

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: Select all

[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: Select all

			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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
r
rvec
Voice
Posts: 7
Joined: Tue Sep 04, 2007 2:18 pm

Post by rvec »

that sounds like something i can't do myself. I'll start looking for some other quote script. thanks for the help.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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.
r
rvec
Voice
Posts: 7
Joined: Tue Sep 04, 2007 2:18 pm

Post by rvec »

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.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try this script:
http://www.egghelp.org/cgi-bin/tcl_arch ... oad&id=649
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. :P
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
r
rvec
Voice
Posts: 7
Joined: Tue Sep 04, 2007 2:18 pm

Post by rvec »

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.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Good for you, then.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
r
rvec
Voice
Posts: 7
Joined: Tue Sep 04, 2007 2:18 pm

Post by rvec »

oops :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
Post Reply