Wednesday, April 22, 2009

Eggdrop



Introduction

Eggdrop is the world's most popular Internet Relay Chat (IRC) bot, designed for flexibility and ease of use, and is freely distributable under the GNU General Public License (GPL).
An Eggdrop bot is a program that sits on an IRC channel and performs automated tasks while looking just like a normal user on the channel. Some of these functions include protecting the channel from abuse, allowing privileged users to gain op or voice status, logging channel events, providing information, hosting games, etc.

Installing Eggdrop

Installing Eggdrop is a relatively simple process provided your shell has the required tools for successful compilation. If you haven't had a shell account then try to find it in our Free unix shell providers .
First thing you should do is to login to your shell, in this session we will use putty as a popular ssh and telnet client program. Read How to login to Unix shell if you are not experienced with this step.
After logging into the shell, In a terminal of the host machine were you want to install the eggdrop just type the folowing commands (without the "type:" letter in the command line):

  1. Type: wget ftp://ftp.eggheads.org/pub/eggdrop/source/1.6/eggdrop1.6.19.tar.gz
    The wget command is for downloading a file from a source site, while eggdrop1.6.19.tar.gz is the downloded file from a source site named ftp://ftp.eggheads.org/ (the official site for eggdrop files)
    Tips : you are recommended to download the eggdrop1.6.19.tar.gz file twice. Firstly : download the file to your shell as we do using wget command. Secondly : download it to your computer and use such winrar/zip program to extract the package. This will help you to learn more about editing eggdrop.conf file on the next section of this tutorial.
  2. Type: tar -zxvf eggdrop1.6.19.tar.gz
    This will extract the Eggdrop source into its installation directory named 'eggdrop1.6.19'. If this doesn't work, try: gunzip eggdrop1.6.19.tar.gz then: tar xvf eggdrop1.6.19.tar
  3. Type: cd eggdrop1.6.19
    Change directory to eggdrop1.6.19
  4. Type: ./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.
  5. Type: make config or make iconfig
    This sets up which modules are to be compiled or to select the modules to compile, but if you're not sure just use make config.
  6. Type: make
    This compiles the Eggdrop. The process takes around two minutes or less on fast systems, longer on slow systems.
  7. Type: make install DEST=/home/$(whoami)/eggdrop
    This will install Eggdrop into a directory named 'eggdrop'. You can change 'eggdrop' to anything you like.
  8. Type: cd ../eggdrop
    Change the working directory to "eggdrop"
  9. @Congrulation!.
    The Eggdrop is now installed into its own directory on your shell, and now you are ready to edit your Eggdrop.Conf file.


Editing Eggdrop.conf file.

    Tips & Info :

  1. You are recommended to change the eggdrop.conf filename to the nickname that will be used by your bot (E.g: mybot.conf).
  2. I will use pico as unix text editor to edit eggdrop.conf. Other options are nano, vim, emacs, and vi.
  3. All lines in eggdrop.conf that start with "#" are comments.
  4. As I've said before, you may want to see "what does exactly the eggdrop.conf file look like???", then extract the eggdrop1.6.19.tar.gz package you've downloaded to your computer and open the eggdrop.conf file using a normal editor program such Wordpad on Windows or SimpleText if your computer is running on Mac.
  5. You don't need to understand all of the following steps if this is your first experience with the subject, just simplely try to read and compare between this and the .conf file on your editor.
Here we go, :

  1. type: pico eggdrop.conf
  2. go down to the section called ##### BASIC SETTINGS ######
    instead of set username "lamest" use username "ircdiary" or something.
    set admin "Lamer < email: lamer@lamest.lamer.org>"
    Next is to set network "NETWORKNAME". Example : "DALnet".
    #set my-ip "78.46.41.143" << change with your ip and remove the #.
    #set my-hostname "server1.bshellz.net" << change with your vhost and remove the #.
  3. go down in the logging section, you will find something called: logfile jpk #lamest "logs/lamest.log".
    change it to logfile jpk #channel-the-bot-will-be-in "logs/channelname.log. Example logfile jpk #mychannel "logs/mychannel.log"
  4. go down to: ##### FILES AND DIRECTORIES #####
    set userfile "LamestBot.user" change to yourbotnick.user
    #set pidfile "pid.LamestBot" change to "pid.yourbotnick" and remove the #
  5. now go down to ##### BOTNET/DCC/TELNET #####
    scroll down to: #listen 3333 all
    put: listen A-port all
    example: listen 52384 all
  6. ##### MORE ADVANCED SETTINGS ##### section
    #set owner "MrLame, MrsLame" remove the # and give a name as the bot's owner.
  7. scroll down to: ##### MODULES #####
    above it there is:
    die "Please make sure you edit your config file completely.".
    Put # before die.
  8. go down to #### CHANNELs MODULES ####
    set chanfile anyname.chan
  9. Additional info :
    set global-flood-chan 10:60 means 10 lines within 60 second and the bot will kick the user
  10. on #### CHANNELS MODULE #### scroll down to :
    # Here is a shorter example:
    #
    # channel add #botcentral { <<<< #channel
    # chanmode "+mntisl 1" <<<<"+nt"
    # idle-kick 1
    # }
  11. go down to #### SERVER MODULE ####
    set net-type 3 <<<< same ircd as dalnet
    set nick "mybotnick"
    set alnick "altmybotnick"
    set realname "Anything you like"

    proc evnt:init_server {type} {
    global botnick
    putquick "MODE $botnick +i-ws"
    putserv "nickserv identify $botnick password " << add this line
    }
  12. scroll down a bit, and you will find:
    set servers {
    you.need.to.change.this.with.your.server:6667
    another.server.net:7000:password
    }

  13. scroll down a bit
    over the line that says #### CONSOLE MODULE #### there's another line you need to comment out it starts with die add # before die
  14. scroll down to #### BLOWFISH MODULE ####
    #loadmodule blowfish remove the #
  15. press ctrl + x then y
  16. to run your bot type: ./eggdrop -m eggdrop.conf
    The bot will try to connect to the written IRC server in your eggdrop.conf file. Send a message to the bot and say something like "Hello" (default).
    That's all. Enjoy your Bot.

Tips & info :

I've made a sample for eggdrop.conf configuration, and I think it's good idea to read this first before trying to configure your own file. Here Link to Download this sample.

0 comments:

Post a Comment