Skip to content

Instantly share code, notes, and snippets.

@alkavan
Last active June 3, 2023 20:53
Show Gist options
  • Save alkavan/4bd1c48abaec2cf277c1efc261387add to your computer and use it in GitHub Desktop.
Save alkavan/4bd1c48abaec2cf277c1efc261387add to your computer and use it in GitHub Desktop.
Installation instructions for the Eggdrop IRC bot.

Eggdrop IRC Bot | Install Instructions

Prepare System (as root)

Install required packages for compile:

dnf install -y wget telnet \
  automake gcc make diffutils \
  tcl-devel openssl-devel

Create a new user on the system for the bot:

adduser eggdrop

Chnage to eggdrop user:

su eggdrop
cd ~

Downloading and unpacking (as eggdrop)

Download the latest version:

wget https://ftp.eggheads.org/pub/eggdrop/source/1.9/eggdrop-1.9.5.tar.gz

Unpack archive:

tar -vxzf eggdrop-1.9.5.tar.gz

Building

Create the destination folder for bots:

mkdir ~/bots

Run configuration script:

cd eggdrop-1.9.5
./configure && make config

Compile the bot:

make

Install bot into custom destination:

make install DEST=${HOME}/bots/kewl

Create bot SSL certificate:

make sslcert DEST=${HOME}/bots/kewl

Bot Configuration

Go to the directory you installed the bot and edit configuration file:

cd ${HOME}/bots/kewl
nano eggdrop.conf

To be able start the bot, you must update/change the following lines:

set username "kewl"
set admin "Sysop <email: sysop@kewldomain.com>"
set network "efnet"
set timezone "UTC"
set offset "4"

...

set userfile "kewl.user"
set pidfile "pid.kewl"
set chanfile "kewl.chan"
set notefile "kewl.notes"
...
 
listen 13377 all

set nick "kewl"
set altnick "kewl_"
set realname "Kewl"

...

server add irc.efnet.nl +6697
server add irf.efnet.fr +6669

Running the bot

Initially you need to star the bot with -m flag to create a user file (-t is interactive terminal):

./eggdrop -m eggdrop.conf -t

After you see the bot connected, introduce yourself as owner:

/msg kewl hello
/msg kewl pass <yourhexorpassword>

Now you should exit the interactive mode and install the bot as background process.

Amazon Linux don't come with cron service (run as root):

dnf install cronie -y
systemctl enable crond.service
systemctl start crond.service
systemctl status crond

Create a cron record that will start/restart the bot:

./scripts/autobotchk eggdrop.conf

Run the crontab file manually to start bot in background:

./kewl.botchk

Connect the but from without SSH using telnet:

telnet localhost 13377
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment