Nov15
An eggdrop is a popular IRC bot that handles users and maintains certain rules & other things on your IRC channels. Eggdrops are useful to have on networks that don’t have IRC services such as Efnet and also useful when you need a certain service such as 24.7 channel logs for statistics (pisg) or quotes in your channel.
The following guide will show you how to install the latest Eggdrop on Debian Etch/Lenny (and probably most other Debian/Ubuntu distributions/versions.)
continue reading »
Sep14
So, lately i’ve been playing around with tcl again, and trying to make it work alongside MySQL to store information such as Q auth’s and various other information on users. Its working quite well.
We connect to MySQL through TCL using a package called mysqltcl.
Here is how I connect:
# First we require the mysqltcl package. You normally have to install this.
package require mysqltcl
set db [::mysql::connect -host localhost -user username -password password -db database];
# Then perform an query...
# JOIN
#
bind join - * rec:join
proc rec:join {nick uhost hand chan} {
global botnick db
if {$nick == $botnick} { return 0 }
set result [::mysql::exec $db "INSERT INTO nicks (timestamp,channel,nickname) VALUES(UNIX_TIMESTAMP(),'$chan','$nick')"]
}
As you can see, in my example we store the nickname and channel when someone joins a channel your bot is sitting in. A very useful module indeed.