Tuesday, 27 October 2009

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"
putlog "Greeting loaded....."
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."
}
}
Then edit your eggdrop.conf file and add to the end:

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?


Thursday, 8 October 2009

GPS Visualizer

Found the GPS Visualizer website while looking for a way to convert Google KML files to Garmin GPX files. I wanted to get the highsites for the Pretoria WUG onto my Garmin GPS so that I could find them when visiting friends and family.

The site offers conversion between major versions of GPS data, and also a very handy little tool to create an images file of the input data.

This image is of the Pretoria WUG Highsites.

Windows 11, but for Web

This guy has created Windows 11 on the web. Have a look at https://dev.to/piyush/windows-11-but-for-web-22h1 Source is over at  https://gith...