Knowledge associations database for Eggdrop by Petr Baudis

db.mod-0.5

Please note, not only do I know little of licensing stuff, but I at this point
don't care to write it either, so here's my stab at it: If this blows up your
machine, complain to /dev/null.  If it works well and you like it, drop me a
line at pasky@ji.cz, and if you have ideas to clean it up and such, feel free,
I'd appreciate a copy of the code so I can see what was done.

I hacked this together in some days' late evenings, because I have assoc.tcl
by one my friend done, but I was uncomfortable by it, because I don't like
TCL a lot and I wanted to modify it extensively. So I did this, my, precious,
nice, better etc ;-)).

A lot of things needs to be improved, TODO list is at the begin of db.c.
db.h contains now only language file macros and dbi.c contains database's
backend.

If you want to build this module, just copy db.mod/ directory into
eggdrop<version>/src/mod, move back to your source's root dir and type make
etc (see INSTALL there). When doing make install, even language and help files
should be installed automagically, but check it and install them manually if
they didn't. You should also now create your database file - go to the
eggdrop's working directory, and type echo " foo bar ^baz">db.dat, if db.dat
doesn't exist. Once this is done, either add "loadmodule db" to your
config file, or ".loadmod db" in DCC, and *voila*, your bot is now
database machine ;-).

It responds to, sophistically said,
??[?] <key> [<next-word-of-key[*1-n]>] [<action> [<data>]]
either in public, private or prefixed by dot in DCC, or dbsave in private or
.dbsave in DCC, which synchronizes bot's database with db.sav - this action
is normally performed every hour.

See .help db ??, .help db ??? and .help db dbsave for details.
And please keep on your mind this is *ALPHA VERSION* - first public version
at all, and it can contain a lot of bugs already, and a lot of features is
'strange' yet ;-).

This module was tested with eggdrop-1.4.4 and 1.4.5, but should hopefully
work with 1.6.x as well...

If you use this, drop me a line too, so I get an idea of how many people try
it and like it.

Petr Baudis
pasky@ji.cz

