================================================================================ Creating a Logging Bot In our fourth lesson, we'll create an IRC bot that logs a channel. Copy the code for logbot.pl to your home folder: $ cp logbot.pl ~/logbot.pl Next, open up logbot.pl using a text editor and make a few changes. 1. Edit the server in line 32. Replace irc.example.com with the server's real address. NOTE: Only IPv4 is supported. 2. Edit line 35 to replace nickname with the nickname you want for the bot. WARNING: The nickname must not already be taken, or else the bot will fail to connect. 3. Edit line 36 to replace username with the username you want for the bot. The username is what appears in a /whois on IRC; it can be different from the nickname. Next, you'll want to make the perl script executable: $ chmod u+x ~/logbot.pl Then run the script: $ perl ~/logbot.pl On IRC, /join #perl104 Chat ================================================================================ Understanding LogBot Next, take a look at the file called ~/comments to see an explanation of key lines in the program. ================================================================================