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.

Newbie seeks guidance on a dictionary script

Old posts that have not been replied to for several years.
Locked
R
Rahven

Newbie seeks guidance on a dictionary script

Post by Rahven »

Hello, and thanks for taking the time to have a look at my question.

What I'm looking to do is write a script that would use a MySQL database to keep word and definition pairs in order.

I'd like to make this publicly accessible, with bang type commands. I want the dictionary entries accesible to Ops, as far as adding, deleting and modifying them.

Something along the lines of:

!dictionary <word>

and for Ops:

!dictionary add <word> <definition>
!dictionary edit <word> <definitiion>
!dictionary del <word> <definition>

I'd also like to possibly make the Op specific commands accessible through:

/msg <botname> dictionary <param> <word> <definition>

Yes I realize I'm probably in way over My head for a first script, but this is something I'd really like to do. I'm not looking for someone to write it for Me, but possibly point Me in the right direction, either with a snippet of example, some advice, or a few links.

I learn better by doing.. and honestly, am having a tough time grasping TCL, but it's just a matter of time.

Thanks again for taking the time to read this, and thanks in advance to any responses I may get. :P
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

If you are really new to tcl and scripting, you might want to check out scripts such as infoegg before you try getting mysql from tcl. *chuckle* I haven't tried anything with sql yet, but from the posts I found here about it, it seems to be a pain in the ass.
R
Rahven

Post by Rahven »

From what I've seen searching through the MySQL posts, it looks like a pin in the ass to me too. Just was hoping someone with a bit more experience could point My nose in the right direction, but you're right, I'm going to give that infoegg script a run through.

Thanx tainted
R
Rahven

Post by Rahven »

I have to wonder if the effect I want can't be achieved by using a normal text file?
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

Have you looked at how infoegg stores the data? standard text file with the word, then -> (cant remember the exact string offhand) , then the response given for the word. What else are you looking for it to do? It has support for setting what flags a user must have to add/delete factoids, and its pretty customizable. If you are still interested in writing your own, its not all that hard. You just need to have it drop the word, followed by a set of chars to seperate the word from the definition, then the definition into a text file and so on.
Locked