### Oom Jurie the Eggdrop Bot

Why?

- Wanted to work on some WUG related feedback in the IRC channels. Things like signal quality for a Nick.
- Wanted a way to log all conversations on the IRC channels.
- Eggdrop is the BOT of choice in the WUG, so had to make it work.
- The only way to get to know IRC, is to automate IRC.

How?

Ubuntu and "apt-get install eggdrop", and then the fun starts. Getting the config file right so that the thing starts is the first mission. The best here is to following the guide at http://www.egghelp.org/setup.htm

Now the thing starts, but what now?

Ok, I found many guides to connect, get the bot to say things, but nothing simple to get me started on the TCL, so here is my help on this.

Figure out the location of the scripts, and add the following script file as greeting.tcl:

set flood-join 0:0
set onjoinchan "#general"
bind join - * greeting
proc greeting {nick uhost hand channel args} {
global onjoinchan greet howtell
if {(([lsearch -exact [string tolower $onjoinchan] [string tolower$channel]] != -1) || ($onjoinchan == "*"))} { putserv "notice$channel :Hi $nick , welcome to$channel."
}
}

source scripts/greeting.tcl
and restart the bot.

It should now talk to you when you join the #general channel.

The second part was to get eggdrop to run a PHP file and pass the output, this I got working using the TCL exec command:

set res [exec /usr/bin/php greeting.php]
for { set i 0 } { $i < [llength$res] } { incr i } {
putserv "PRIVMSG $nick :[lindex$res \$i]"
}
This is very short and to the point. There are many resources, so please use Google for more help.

Where?