Mulyana Sandi

Belajar menulis dan berbagi ilmu melalui blog, sedikit tulisan semoga menjadi banyak manfaat :D.

Star Bolic

Belajar menulis dan berbagi ilmu melalui blog, sedikit tulisan semoga menjadi banyak manfaat :D.

Home Mini Server and VoIP

Banyak sekali perangkat yang terselubung diantara ilmu yang bermanfaat, perangkat kecil dengan hasil yang gak bisa di taksir.

Mulyana Sandi

Belajar menulis dan berbagi ilmu melalui blog, sedikit tulisan semoga menjadi banyak manfaat :D.

Antenna Star Bolic

Menembus jarak dengan perangkat yang murah meriah namun memerlukan kreatifitas dalam pembuatannya.

Tuesday, November 5, 2013

HOW TO: Setup up Eggdrop IRC bot easily with Ubuntu


1. First install eggdrop using apt-get or synaptic if you prefer that:
sudo apt-get install eggdrop
2. Download the simple.conf file from here:
http://www.egghelp.org/files/conf/simple.conf.gz 
and unpack it.
cd ~
wget http://www.egghelp.org/files/conf/simple.conf.gz
gunzip simple.conf.gz
3. Open the simple.conf file in your home directory with a text editor of your choice (vi, nano, pico whatever). I'll use nano in my example because that's what I'm most familiar with:
nano simple.conf
4. Now we are editing the simple.conf configuration file. This simple file has very self-explanatory comments to explain what each setting does. Edit them to suit your needs. There are very few things you need to change, and each line has instructions preceding it. The only thing you must take care of is this line:
set username "user"
5. For some reason, I could get eggdrop to work only from /usr/lib/eggdrop directory, and only as a regular user (sudo will not work). So let's make the eggdrop directory writable first:
sudo chmod 777 /usr/lib/eggdrop -R
6. Now let's run eggdrop for the first time using the simple.conf file.
/usr/lib/eggdrop -m ~/simple.conf
7. in the IRC channel, you will also be given instructions to prove your ownership of the bot. By default, you can send HELLO as a private message to the bot and it'll recognize your ownership. Remember to login to IRC using the same nickname as you defined in the simple.conf file in the bot owner section.
/msg yourbotname HELLO
8. Now let's set this bot to start with the Ubuntu startup.
First make a shell script that starts eggdrop with your conf file:
sudo nano /etc/init.d/eggbot
#!/bin/sh
Echo "Starting Eggdrop IRC bot..."
cd /usr/lib/eggdrop
sudo -u username eggdrop /home/username/simple.conf
9. Now let's make the file executable.
 sudo chmod a+x /etc/init.d/eggbot
 10. Finally let's tell the system about the new file named eggbot we put in /etc/init.d directory so it updates its information:
  sudo update-rc.d eggbot defaults
Source : http://ubuntuforums.org/showthread.php?t=1028042