The (more or less) original TinySpeck IRC logging and reporting bot, written in perl.
Requires POE::Component::IRC and DBD::mysql from CPAN.
Config options are at the top of
MySQL schema is included in
For a slightly less awful version, I suggest look at logbot in node.