Eggdrop is an IRC bot, written in C. Eggdrop, being a bot, sits on a channel and takes protective measures: to keep the channel from being taken over (in the few ways that anything CAN), to recognize banned users or sites and reject them, to recognize priveledged users and let them gain ops, etc. Eggdrops are probally the most popular bots on IRC. Some even think overused. In practise they are easy to maintain, and expand its features with the use of tcl scripts. Although the installation is in fact not hard, for complete *nix novices it might be a daunting task at first attempt. Here we provide a walk through, which togheter with the Unix Primer article should help you to get your bot up and running in no time.
What do u need?
To install an eggdrop, you need some sort of Unix account (populary called a "shell"). You can download some precompiled windows Eggdrops (windrops) at http://windrop.cjb.net/. I prefer an eggdrop on some sort of Unix account, wich are more stabel than others ...
Installing the Eggdrop on the Shell
1) First off all, you'll need to download the eggdrop source. You can download eggdrop sources from ftp://ftp.eggheads.org/pub/eggdrop/source/. This is the official site for the latest releases of Eggdrop 1.3, 1.4 and 1.6.
2) When you've downloaded the source, you need to upload it to your Unix account, with some sort of FTP client.
3) After uploading the file, telnet to your shell-account and type tar -zxvf eggdrop1.X.X.tar.gz (if this doesn't work, try gunzip eggdrop1.X.X.tar.gz then tar -xvf eggdrop1.X.X.tar). This will extract the Eggdrop source into its installation directory, named 'eggdrop1.X.X'. (the X.X stands for the version number)
4) Type cd eggdrop1.X.X to switch to the directory the Eggdrop source was extracted to.
5) Type ./configure (don't forget the . !). This makes sure the shell has all the right tools for compiling Eggdrop, and helps Eggdrop figure out how to compile on the shell.
6) When configure is done, type make config. This sets up which modules are to be compiled. For a more efficient installation, you can use make iconfig to select the modules to compile, but if you're not sure just use make config. (NOTE: only do the make config to compile version 1.6.x, else skip this rule)
7) Type make. This compiles the Eggdrop. The process takes around two minutes or less on fast systems, longer on slow systems.
8) Type make install DEST=~/botdir. This will install Eggdrop into a directory named 'botdir'. You can change 'botdir' to anything you like. Note that in some cases you may need to specify the full path, e.g. make install DEST=/home/madboy/botdir - using the ~ character in make install won't always work. You can get the full path you need by typing pwd. You can also type make install, this will make the eggdrop install in a standard dir, called 'eggdrop'.
9) You can safely delete the installation directory named 'eggdrop1.X.X' (to do this, type cd .. then rm -rf eggdrop1.X.X) that was created previously, although some people may find it handy to keep that directory for performing additional or future installations of the same version without recompiling.
That's it! Eggdrop is now installed into its own directory on the shell. Now, all you have to do is edit your confg file.
Configuration File
If you're just starting out with Eggdrop, you should use eggdrop.simple.conf, you can find this file in your eggdrop directory. Go through each step carefully, and be sure to read each explanation carefully before deciding to turn a option on or off. For servers that allow Eggdrop bots, check their motd. The configuration part is what you will spend most time on from the whole process. It takes some time if you never have setup a eggdrop bot before. But failing to do this properly, and you can get into a whole load of problems later, like your bot deopping your friends (the dreathed +bitch mode), and other problems. Ofcourse that can all be fixed later on, but its better to do it right the first time, not? Motto: edit this file correctly!
Starting the bot for the first time
After editing your eggdrop.simple.conf, you save it under botnick.conf. You start the bot by typing ./eggdrop botnick.conf -m. The option -m is only required the first time you start up a bot. This will setup a userfile. From now on you use: ./eggdrop botnick.conf to start your bot.
The bot will now be started up, and connected to IRC. To make yourself the owner of the bot, goto IRC and type /msg botnick hello. Now the bot will ask you to set a pass by typing /msg botnick pass yourpass.
Configuring Crontab
Its enivitable that your bot will be down from time to time. The Shell provider might reboot the server, and a host of other problems can arise that would quit the eggdrop bot. Luckily for us, we can setup a crontab job that monitors if the bot is running, and if thats not the case, start it up.
Start up pico, and edit the file botchk, usually found in the scripts directory. Make sure the paths are all setup correctly, and save the botchk into the same directory the eggdrop executable is. To test if the botchk is setup correctly, kill your bot, and after that type: ./botchk If your bot starts up ok, then your botchk is setup correctly. If not, fix the problems, and try again.
Now we have to get this all into the actual crontab. To do this first type the next command line:
export VISUAL=pico; crontab -e
This will open the crontab for your shell. It might be empty, or there might be some entries already. Dont delete anything, but add the next line of text (under your excisting entries if they are there):
0,10,20,30,40,50 * * * * /home/pathToBotDir/botchk >/dev/null 2>&1
It might be wise to use other numbers then 10, 20 etc. These are the minutes when the crontab will check if the bot is running. If all users on the server are using the same time to check their bot, it would mean a serious load on the system. Instead, use something like 2,12,22, etc. For a final test you can kill the bot, check your watch, and see your bot coming back online wihout ne effort :o)
Congrats, your bot should be all running fine now. You can enter its partyline with /dcc chat botnick, and add users for the channels you want the bot to control. In time you might want to expand the possibilities of your bot. There are a lot of websites wich have many tcl scripts online that will expand the possibilities of your bot considerably. Have your bot auto-login to X, use a more versatile !seen script, add userfriendly public commands like !op and !ban, have the bot check visitors for "questionable" channels etc. The possibilities are endless!
|