Eggdrop Install Help

Disclaimer:
All information here has been gathered from several sources, and has all been used by me on my own personal eggdrops.


Getting the Eggdrop Source

There are many different versions of Eggdrop available for download from various FTP sites.
The current version is 1.4.3. In my opinion, 1.3.27, 1.3.28, and the 1.4 series are currently the best versions of Eggdrop. If you're just starting out with Eggdrop, you should use one of these. This page will use version 1.4.3 as an example.

ftp://ftp.eggdrop.net/pub/eggdrop/ is run by the old Eggdrop development team and is a good place to get Eggdrop2 and older versions of Eggdrop.

ftp.eggheads.org/pub/eggdrop/ is the official site for the latest releases of Eggdrop 1.3 and 1.4. (also the place where I got most of this information). Download the file for the version you want to your computer (save it where you can find it .. like a folder on your desktop, maybe). Note: if you download Eggdrop with an old version of Internet Explorer or Netscape, the filename may be corrupted into something like eggdrop1_3_28_tar.tar once it's downloaded. If that happens, make sure you change it back to eggdrop1.3.28.tar.gz. You can right click on the link and select "save link as" with Netscape to eliminate this problem.

Eggdrop requires Tcl to compile and run. Most shell providers have Tcl already installed, but if the server you want to run Eggdrop on doesn't have Tcl, you'll need to download and install it. You can get the TCL source here:   ftp://ftp.scriptics.com/pub/tcl/  Tcl 8.04 is supposed to be one of the best versions of Tcl to use.



Installation:

These instructions assume you will be installing eggdrop1.4.3.tar.gz, so just change the numbers if you are installing another version.

dot Put the Eggdrop source on your shell using FTP (my preference). It don't have to be in a folder, you'll take care of that next.

dot Telnet to the shell (if you haven't already), and type tar zxvf eggdrop1.4.3.tar.gz (if this doesn't work, try gunzip eggdrop1.4.3.tar.gz then tar xvf eggdrop1.4.3.tar). This will extract the Eggdrop source into its installation directory, named 'eggdrop1.4.3'.

dot Type cd eggdrop1.4.3 to switch to the directory the Eggdrop source was extracted to.

dot Type ./configure (that's a period followed by a slash followed by the word 'configure').  This makes sure the shell has all the right tools for compiling Eggdrop, and helps Eggdrop figure out how to compile on the shell.

dot When configure is done, type make (you will be prompted to). This compiles the Eggdrop. The process takes around two minutes or less on fast systems, longer on slow systems.

dot Type make install DEST=~/botdir.
This will install Eggdrop into a directory named 'botdir'. You can change 'botdir' to anything you like.
Note: With Eggdrop 1.4.2 and later you may need to specify the full path,
make install DEST=/home/mydir/EggBot/eggdrop
Using the ~ character in make install won't always work. You can get your full path by typing pwd.

dot You can now safely delete the installation directory named 'eggdrop1.4.3' and the zip file you uploaded (to do this, type cd ~ then rm -r eggdrop1.4.3 and rm -r eggdrop1.4.3.tar.gz), although some people may find it handy to keep that directory since it contains the sample configuration file (you will definitely need that if you didn't download a copy of the Eggdrop source to your system) and all the docs.

Now it's time to edit the config file. You can close your Telnet connection for a while.



There are two files you will need to edit before you can start up your Eggdrop - the configuration file and the botchk file (we'll get to this later on). You can find the example configuration file in the directory you extracted the Eggdrop source to, under the name 'eggdrop.conf.dist', and the 'botchk' file can be found in the /scripts subdirectory. Download these to your computer with FTP and edit them with your text editor.


Editing the config file

You first need to rename the config file to something other than 'eggdrop.conf.dist' - giving it the name of the bot's nick (e.g. eGGbot.conf) is quite common. Eggdrop has many options to configure, and editing the configuration file can take some time. In the configuration file, you set up the IRC servers you want the bot to use, the channels you want the bot to be in, and set Eggdrop's options to suit your needs. It is recommend you go over the entire config file to ensure the bot will be configured properly for your needs. All of the options in the config file have written explanations. Be sure you read them carefully. Some of them can be a little bit vague. If you want to take full advantage of all Eggdrop has to offer, you will need to spend the extra time it takes to go through and understand many of the options in eggdrop.conf.dist.
I will just skim over a few of the most important things, and you can set the rest at your discretion.

dotset username: if your shell runs identd (most do), then you should set this to your account login name.

dotset my-hostname and set my-ip: you'll need to set one of these if you want your bot to use a vhost.  my-hostname is the vhost.
Example:
irc.gods.rule.net
my-ip is the IP address of the vhost.
Example:
206.343.63.217.
You don't need to set both of these, but it's recommend that you do. It can help if the shell is having problems with DNS.

dotlogfile: keeping logs is always  good idea. Generally, you should have one log for bot stuff, and one log for each of your channels.
For bot stuff, add the line logfile mcobxs * "botnick.log" to the config.
For channels, add
logfile jkp #channelname1 "channelname1.log"
logfile jkp #channelname2 "channelname2.log"
Make sure you remove the sample logfile lines for the channel #lamest. If you'd like to put your logfiles in their own directory, specify the directory in the log name.
Example:
logfile jkp #channelname "logs/channelname.log" (to write the logfiles in the /logs directory)

dotlisten 3333 all: you will definitely want to change this. Choose a port between 4000 and 65536. You can disable this by commenting it out, but that will prevent any telnet connections to the bot (you won't be able to use the bot as a hub, won't be able to telnet to the bot, and the bot won't respond to /ctcp botnick CHAT requests ).

dotset dcc-flood-thr: this setting determines the number of lines per second you can send to the party line before being booted. It can be a pain in the butt when you want to paste multiple lines on the party line (like several bans at once), so you may want to increase this to something like 5 or 10 or more.

dotset hourly-updates: it's a real good idea to change this from the default setting of 00, since there are lots of other bots already using 00 and this puts a lot of stress on the shell at that time. Choose something that isn't a multiple of 10 (like 02, 19, and 41). Always put these in double-digits.

dotset owner: you should only put one person in this list - yourself. Set it to the nick you will have on the bot. Do NOT leave it set to the default "MrLame, MrsLame".

dotchannel add: this is the command you use to add channels to the bot. There are lots of options for this command. Channels are added in the following format:

channel add #channelname1 {
        options
}

channel set #channelname1 +option -option

channel add #channelname2 {
         options
}

channel set #channelname2 +option -option

All the different options and channels settings are shown in the examples in the config file. Make sure you remove the example entries for #lamest and #botcentral.

dotset nick: this is what you use to specify your bot's nickname. It is recommend that you don't use [ ] { } \ character's in the bot's nick. These can cause problems with some Tcl scripts. If you'd like to use them, you'll need to precede each of those characters with a backslash in the setting.
Example:
If you wanted your bot to have the nick [eGGbot], use set nick "\[eGGbot\]".

dotset altnick: Same rules as above apply.

dotset servers: you should specify multiple servers in this list, in case the bot is unable to connect to the first server. The format for this list is shown below.

set servers {
           irc.whatever.org:6667
           irc.who.knows.com:6665
           irc.having.fun.net:6667
}

Wherever possible, you should use a port other than 6667 (connect to the server and type /motd to see a list of available ports). You should use servers that allow bots (some shells have rules enforcing this), but unless your shell's policy says otherwise you may also wish to use non-bot servers as a backup in case your IRC network has very few bot servers your bot is able to connect to (but place the servers that allow bots at the top of the list).

dotset learn-users: this determines how users will be added to your bot. If set to 1, people can add themselves to the bot by sending 'hello' to it (the user will be added with the flags set in default-flags). If set to 0, users cannot add themselves - a master or owner must add them using the .adduser command.

dotunbind msg - hello *msg:hello and
dotbind msg - myword *msg:hello: these allow you to change the 'hello' command to something different. Change myword to the name you the hello command you want. If you have learn-users set to 1, this command is only used for when you first introduce yourself to the bot.
 

dotFinally, be sure to remove the 'die' commands from the config (there are two of them 'hidden' in various places), or the bot won't start. Please take the time to go through the rest of the config file and at least look at it (even if you change nothing, you'll know what it does). Once you've finished editing the config file, make sure you rename it to something other than eggdrop.conf.dist if you haven't already. Then (if you edited the config file locally) upload the config file to the directory you installed the bot.



Editing the botchk file

The botchk script and crontab are used to automatically restart the bot if the shell it's on reboots or if the bot process is killed for some other reason. You can find the botchk file in the scripts directory (in the directory you installed the bot to). Newer versions of Eggdrop (from 1.3.24i) have a script included that automatically configures botchk and crontab for you. In telnet, switch to the scripts directory and type
dotchmod 700 autobotchk
./autobotchk <config> -dir /home/botdir -noemail
where /home/botdir is the directory you installed the bot to and <config> is the name you chose for your config file.
Example:
./autobotchk eGGbot.config -dir /home/mydir/eGGbot/ -noemail



For those of you using an older bot, open the botchk file with your favorite text editor, and change the following:

change this to the directory you run your bot from:
dotbotdir="/home/mydir/eGGbot"

change this to the name of your bot's script in that directory:
dotbotscript="eGGbot.conf"

change this to the nickname of your bot (capitalization COUNTS)
dotbotname="eGGbot"

change this to the name of your bot's userfile (capitalization COUNTS)
dotuserfile="eGGbot.user"

Save the file (as botchk not botchk.txt). If your text editor renames it botchk.txt, simply delete botchk and rename botchk,txt to botchk. Upload this file to your scripts folder.



Next, we want to make the script executable.

dotTelnet to your bot's scripts folder and type:
chmod 755 scripts/botchk
If you have more than one bot in the directory, make a second botchk file (botchk1) for the second bot and make it executable as well.
chmod 755 scripts/botchk1

dotNow we want to go back and double check your config file. Many people do not correctly set up the very first line, which looks like:
#!/home/mydir/EggBot/eggdrop

This is the EXACT path (capitalization counts) to the eggdrop binary in your bot's dir, not the dir itself, and not the config file.

dotAt this point, it might be wise to test if you have everything set up correctly so far. From the main directory(EggBot folder) kill the bot, and run the botchk script.
kill -9 pid (where pid=the bot)
scripts/botchk

If it works, it will launch your bot.

Next step is to set up the crontab. Open your favorite text editor with a new empty file (Notepad works just fine for this).

dotFor each bot you run on your shell, add one of these lines:
0,10,20,30,40,50 * * * * /home/mydir/EggBot/scripts/botchk >/dev/null 2>&1
or
3,13,23,33,43,53 * * * * /home/mydir/EggBot/scripts/botchk >/dev/null 2>&1
This second one will check for your bot every 10 minutes, but starting with 3 minutes after the hour (which means it won't be checking at the same time as all the "other" accounts on your server). Save this new file as mycron (make sure it isn't mycron.txt) then upload it to your bot's directory via FTP.

dotNow set crontab to use the file you just uploaded.
crontab ~/mycron

dotLast thing. Kill your bot(s) and wait ten minutes to check if they restart. If not, go back through all these steps and double check everything. If it still doesn't work, you my not have access to crontab on your shell, so check with your admin. If you're running more than one bot, repeat this entire process with a second botchk file and add a second line to the crontab file.



As I stated earlier, all of this works with my personal bots.
I have both a 1.4.3 and a 1.3.22 so I have used both methods to configure botchk and get crontab up and running. If you need further help, contact me either in #pirchpopups on WebChat (irc.webchat.org:6667) or via email.