                  Zebot installation

DOWNLOAD
========
from the project page: https://savannah.nongnu.org/files/?group=zebot

though it is advised to fetch the freshest version through cvs:
setenv CVSROOT user@subversions.gnu.org:/cvsroot/zebot/
setenv CVS_RSH ssh
#fetch the working dir: cvs -z3 co zebot
#make a filedump: cvs -z3 -d bboett@subversions.gnu.org:/cvsroot/zebot/ export -D '2003-05-21 17:57' zebot
#send up a new files revision: mkdir -p /tmp/sv_upload/zebot.pkg/2.17/ && cp "zebot-2.2.tar.bz2" /tmp/sv_upload/zebot.pkg/2.17/ && scp -r /tmp/sv_upload/* bboett@subversions.gnu.org:/upload/zebot/ && rm -r /tmp/sv_upload/
cvs -z3 update
etc

DEPENDENCIES
============
You need some libraries and software to run this bot properly:

To install additional perl packages, it is advised to use the "cpan"
command (if you have not this command, you may achieve the same typing perl
-MCPAN -e shell). Once you get the "cpan>" prompt, type for example "install
Data::Dumper" It is also possible to use packages from your distribution (we
give some examples for debian)

- Data::Dumper for some debugging puposes or for easier data structure
representation.

- POE the perl object environment (the debian package name is
libpoe-perl)

- POE::Component::IRC the POE irc component (the debian package name is
libpoe-component-irc-perl)

- XML::Parser for the internatonalisation module and associated modules
(trigger) (the debian package name is libxml-dom-perl)

- the default config with dummypam does not make use of any database. 
- all the other pam modules need DBI and DBI:Pg in addition to access to a
postgres-sql database.

- for the GUI you need Gtk2-perl (Gtk2)

SETTING UP
==========

In the meantime each module has its own config file, those files are loaded
only if the module is activated in the actors.conf file. Those files are now
located per default in ~/.zebot/conf. You can change this default directory by editing the zebot.pm file search for configpath. You can override this and other settings by giving an argument on the command line:

./zebot.pl --configpath newpath

The other settings can be changed in the same way, prepend to the name of the
setting a -- and add the new value after the name, separated by a space.
Alternatively, if no value follows the argument, it is set to 1, prepending the
name of the setting by 'no' set the value to 0, e.g:

./zebot --reconnect --nodebug

sets reconnect to true (1) and debug to false (0)

Copy the sample-* files over to the same name without the preceding sample- and
edit them to your convenience into the target dir. 

Example to set up the config dirs and moving out the config files:

mdir -p .zebot/config
mdir -p .zebot/ressources
\ls -1 sample-*| perl -e 'while (<>){ chomp; my $a = $_; s/^sample-//gi; `cp $a ~/.zebot/config/$_` }'
or alternatively and perhaps better:
perl -MFile::Copy=copy -wle 'foreach (@ARGV){ copy($_,"$ENV{HOME}/.zebot/config/$1") if /^sample-/is;; }' sample-*

the files are 

 - basereactions.conf
 - downloader.conf
 - mailbox_pg.conf
 - messageHandler.conf
 - pam.conf
 - servers.conf
 - users.conf
 - zebot.conf (general settings), 
 - actors.conf 
 - servers.conf (there you store the servers you want to connect
to) to your convenience.

fetch the logo from the website:
(cd .zebot/ressources; wget http://www.nongnu.org/zebot/pics/logo.png)
needed by the GUI's about-box


Open each of these files and customise as explained in the comments 

!!BEWARE!! if the bots saves its settings all the comments will disappear, fi
you find a way to update the config files leaving the comments inside, you
might tell me....

Per default the ressource files are expected there as well thus:

cp res_* ~/zebot/ressources/

If you use a postgresql database, make sure you have a database named zebot
with your user as owner or at least all rights on it.  Zebot will populate
itself the DB if its empty. If you want to use another database or have
separate databases for pam and e.g. mailbox_pg you need to change the settings
in their respective config files.

e.g.

su - postgres
createuser --pwprompt titi
exit
createdb zebot


RUNNNING
========

run the ./zebot.pl script from a shell to start the thing. You will see
zebot's info and debug messages in the shell.
Connect to irc by yourself, join one of the channels where zebot is
present, and send commands !
Start by
/msg toutou help

If you are running zebot for the first time and with the regular pam
module instead of dummypam, you will need to identify yourself towards
the bot as an owner using the /msg botname auth ownerpass, ownerpas
beeing the password you put into the zebot.conf file.

Otherwise the use should be quite straightforward, and you might want to rely
on the online help, sending /msg botname help [topic] to fetch it.

Have fun
