ilbot - an IRC Log Bot
On #perl6 we had the need for
a irc log that could easily be accessed with a web interface. So I wrote
one.
It consists of an IRC bot based on Bot::Basicbot
that logs into a (mysql) database, and a web frontend that displays the
data nicely.
Features
Links
URLs are turned into links.
More importantly for the logging of #perl6, there are special
constructs that are turned into links:
- An 'r', followed by a number (for example r12345) is turned into a
link to the corresponding changeset of pugs' subversion
repository
- Something of the Form S05:123 (S\d\d:\d+) is turned into a link to
the Perl 6 Synposis documents,
pointing to the right Synopsis including line number.
- Abbreviations used in logs are annotated according to a plain text
database.
Privacy
If you want to write something in a channel that is logged by ilbot,
and don't want that line to be logged, prepend it with the string
[off].
An @ sign proceeded and followed by letters and numbers are turned
into a small image showing an @ sign to prevent email adresses from
beeing maschine readable.
Layout
Just take a look at the
#perl6 irc log to get
an idea how the generated logs look like.
Requirements
In order to run ilbot and the associated CGI scripts, you need a web
server
- ... with a mysql database
- ... on which you have shell access (to run the logging bot)
- ... where you can install Perl modules from CPAN as you wish
- ... with a running Apache Server, and .htaccess and mod_rewrite
enabled
-
It's preferable to run on a separate virtual hosts (the rewrite rules
and templates aren't tested for a different case; that said they
should work).
Download
The source code lives on
github.
git clone git://github.com/moritz/ilbot.git
Installation
To install these scripts on your system you need to
- Create a database, you can use ilbot.sql for that if you use
MySQL
- Install all dependencies, among them are
- Bot::BasicBot
- Calendar::Simple
- Config::File
- CGI
- DBI
- CGI::Carp
- Encode::Guess
- HTML::Entities
- HTML::Template
- File::Slurp
- Regexp::Common
- Text::Table
- Cache::Cache
- Modify all config files, hopefully they are self-explanatory.
- Copy (or link) the files of the cgi/ directory to where your
webserver can find them, and edit the
colors hash to fit
your needs.
- Be sure to password-protect the file spam.pl with a
.htaccess file.
- Edit cgi/footer.tmpl and insert your name and Homepage in the
"Provided by..." sentence, and add your contact details (and delete mine,
please).
Perhaps a more detailed description will follow.
Other sites using ilbot