infobot - an plugin based irc bot based on Kevin Lenzo's original irc bot
The original Infobot was written by Kevin Lenzo. You can get more information from here.
http://www.infobot.org/
The code is horrible.
This is a new version of the Infobot based on Tom Insam's Bot::BasicBot::Pluggable infrastructure. It's much nicer. Well, I think so anyway.
Bot::BasicBot::Pluggable
I've ported over most of the plugins I've found or provided the functionality in other ways.
All in all, there should be no loss in functionality, maybe even a little increase. And it's much easier to patch and extend.
Infobot - now with 78% less crack.
We look in the current directory for a file called infobot.conf, which is in .ini file. Variables are seperated into the main namespace and then sub namespaces for each plugin.
infobot.conf
.ini
For example the config file
channels = #somechannel #someotherchannnel server = irc.example.com nick = mybot [Foo] somevar = a value
Will join a couple of channels under the given nick. The plugin Bot::BasicBot::Pluggable::Module::Foo will have the variable somevar set a value. Individual plugins will describe their config values however the config values available for the main bot are -
Bot::BasicBot::Pluggable::Module::Foo
somevar
a value
The server we're going to connect to. Defaults to "irc.perl.org".
The port we're going to use. Defaults to "6667"
The nick we're going to use. Defaults to five random letters and numbers followed by the word "bot"
Alternate nicks that this bot will be known by. These are not nicks that the bot will try if it's main nick is taken, but rather other nicks that the bot will recognise if it is addressed in a public channel as the nick. This is useful for bots that are replacements for other bots...e.g, your bot can answer to the name "infobot: " even though it isn't really.
The username we'll claim to have at our ip/domain. By default this will be the same as our nick.
The name that the bot will identify itself as. Defaults to "$nick bot" where $nick is the nick that the bot uses.
The channels we're going to connect to.
The list of irc nicks to ignore public messages from (normally other bots). Useful for stopping bot cascades.
Set to '1' to disable the built-in flood protection of POE::Compoent::IRC
The name of the backend Store module to use. Defaults to Storable and Bot::BasicBot::Pluggable ships with that and a DBI backend.
Store
Storable
DBI
When the infobot starts up it will look in the current directory for various .storable files. The are used as variable stores for the various plugins.
.storable
Stores are passed anything in the Store namespace. Perhaps the most important value is name which describes which backend to use - the default is Storable but Bot::BasicBot::Pluggable also ships with a DBI backend.
name
See the various backend for what variables you need to pass. Here are some examples
[ Store ] type = Storable
[ Store ] type = Deep file = brane.deep
[ Store ] type = DBI dsn = dbi:SQLite:brane.db user = myusername password = mypassword table = brane
the table should be created automatically
Simon Wistow <simon@thegestalt.org>
based on the original code by Kevin Lenzo et al.
Copyright 2005, Simon Wistow
Distributed under the same terms as Perl itself.
Bot::BasicBot::Pluggable, Config::Tiny
To install Bot::Infobot::Config, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bot::Infobot::Config
CPAN shell
perl -MCPAN -e shell install Bot::Infobot::Config
For more information on module installation, please visit the detailed CPAN module installation guide.