An IRC bot is a set of scripts or an independent program that connects to Internet Relay Chat as a client, and so appears to other IRC users as another user. An IRC bot differs from a regular client in that instead of providing interactive access to IRC for a human user, it performs automated functions. This definition of a bot is from http://en.wikipedia.org/wiki/IRC_bot
I downloaded my eggdrop program from the website www.eggdrop.org.
Download and installation to your shell
Go to the website mentioned above and go to the “Setting up and eggdrop” page
Notice the zip file eggdrop1.6.19+ctcpfix.tar.gz
Open up a session in lab46 and type the command wget and a space
Copy the
URL address for
eggdrop1.6.19+ctcpfix.tar.gz from the website and paste it in after the
wget command and hit enter
To unzip the file, type the command gunzip eggdrop1.6.19+ctcpfix.tar.gz
Now, to unzip the .tar file all you have to do is type tar zxvf eggdrop1.6.19+ctcpfix.tar
Type the command cd eggdrop1.6.19, this will put you inside the eggdrop directory
Type the command ./config
Type the command make file
Type the command make
Type the command make install DEST=~/botdir
That completes the installation, now onto modifying your .conf file
Modifying your configuration file
Locate the file eggdrop.conf inside your botdir directory
Rename this file to something like [your bot's name].conf
Open up the config file using VI. An example of the command for this is vi mr_roboto.conf
Now…the config file is large (over 1300 lines long) you are going to have go through this line by line and read what lines to change. The config file is documented very well, so just read the notes and change the lines accordingly
Here are some of the things you'll have to change/modify
Line 1: modify this line to the full path to the executable files for you eggdrop
Line 26: change the name of the bot to what you want to name your bot
Line 176: Change this to [your bots name].user
Line 199: If you want your bot to have a message of the day (MOTD), then make sure this line is un-commented
Line 351: Change the owner to yourself
Line 408: You must comment this line out or your bot wont work
Line 504: Change the channel to #botchan
Line 504 to 524: Un-comment each line
Line 513:remove all text between the brackets - this line should read auto-op {}
Line 796: If you want an alternate bot name then set it here
Line 800: set the real name to be displayed on the
IRC
Line 812: Set default port to 6667
Line 824: Set the server name. example for this is set servers {irc.offbyone.lan}
Line 1024: change this etting to 1
Line 1206: change this to your root directory for file systems
Line 1264: Comment this line out or your bot wont run
Line 1341: Insert any additional scripts you want your bot to run - example source scripts/blackjack-eng.tcl
Phew….that covers the modification to the configuration file. Now onto getting you bot up and running on IRC and making yourself the bots master
Getting your bot up and running in an IRC
Open up an
IRC screen and type the command
/join #botchan
Type the command /names, you should notice your bot's name there
Type the command /dcc chat [bot's name]
The bot will ask for your name
Then it will ask for you to create a password
Now type “hello”
Now..Let's give your bot some personality and the ability to talk on his/her own in the channel. We will do this by installing MegaHAL
-
Perform a wget on the version 2.7 sourcecode
Go to the “documentation” page (scroll to the bottom of the site)
Follow the steps under the Installing(non-Windrop) section
That's it, you should now have a functioning bot in the #botchan