Simon Wistow > Bot-Infobot-1.0 > infobot

Download:
Bot-Infobot-1.0.tar.gz

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

infobot - an plugin based irc bot based on Kevin Lenzo's original irc bot

DESCRIPTION ^

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.

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.

CONFIGURATION ^

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.

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 -

server

The server we're going to connect to. Defaults to "irc.perl.org".

port

The port we're going to use. Defaults to "6667"

nick

The nick we're going to use. Defaults to five random letters and numbers followed by the word "bot"

alt_nicks

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.

username

The username we'll claim to have at our ip/domain. By default this will be the same as our nick.

name

The name that the bot will identify itself as. Defaults to "$nick bot" where $nick is the nick that the bot uses.

channels

The channels we're going to connect to.

quit_message

The channels we're going to connect to.

ignore_list

The list of irc nicks to ignore public messages from (normally other bots). Useful for stopping bot cascades.

flood

Set to '1' to disable the built-in flood protection of POE::Compoent::IRC

store

The name of the backend Store module to use. Defaults to Storable and Bot::BasicBot::Pluggable ships with that and a DBI backend.

STORES ^

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.

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.

See the various backend for what variables you need to pass. Here are some examples

Storable

    [ Store ]
    type = Storable

Deep

    [ Store ]
    type = Deep
    file = brane.deep

DBI

    [ Store ]
    type     = DBI
    dsn      = dbi:SQLite:brane.db
    user     = myusername
    password = mypassword
    table    = brane

the table should be created automatically

AUTHOR ^

Simon Wistow <simon@thegestalt.org>

based on the original code by Kevin Lenzo et al.

COPYRIGHT ^

Copyright 2005, Simon Wistow

Distributed under the same terms as Perl itself.

SEE ALSO ^

Bot::BasicBot::Pluggable, Config::Tiny

syntax highlighting: