IRCPlus.nl

Eggdrop Tutorial

Learn how to install, configure and extend an Eggdrop bot with Tcl scripts.

What is Eggdrop?

Eggdrop is an IRC bot that can run continuously and help with:

  • Channel management, including operator tasks and bans
  • Spam and flood protection
  • Automation

The bot usually runs on a VPS or Linux server.

Install on Linux

Install Eggdrop over SSH:

wget https://ftp.eggheads.org/pub/eggdrop/source/1.10/eggdrop-1.10.1.tar.gz
tar -xvzf eggdrop-1.10.1.tar.gz
cd eggdrop-1.10.1
./configure
make config
make install
        

After installation, configure the bot before connecting it to a live channel.

Configuration

Go to the Eggdrop directory you installed and open the configuration file:

nano eggdrop.conf
        

Important settings:

  • Bot nickname
  • Server and port
  • Owner handle
  • Channels

Create a configuration

Update the settings for your server and channel. You can also use the Eggdrop Config Maker on this site.

Start the bot

Start the bot with:

./eggdrop -m eggdrop.conf
        

The bot should now run in the background.

Add an owner

In IRC:

/msg botnick hello
/msg botnick pass yourPassword
/ctcp botnick chat
        

Eggdrop should send you a DCC Chat request. Connect and use .help to see available bot commands.

Basic Tcl script

Eggdrop supports Tcl scripting.

bind pub - !hello hello_cmd

proc hello_cmd {nick host hand chan text} {
    putserv "PRIVMSG $chan :Hello $nick!"
}
        

Type !hello to get a response from the bot.

Load a script

Add this line to your configuration:

source scripts/mijnscript.tcl
        

Then run:

.rehash
        

Useful commands in DCC Chat

  • .op nickname
  • .deop nickname
  • .kick nickname reason
  • .ban nickname
  • .rehash
  • .restart

Tips

  • Run the bot on a reliable server.
  • Use strong passwords.
  • Back up your configuration.
  • Only use Tcl scripts from sources you trust.

A carefully configured bot can help keep a channel stable.


IRCPlus Eggdrop tutorial — bots and automation