Bot-Pastebot

 view release on metacpan or  search on metacpan

pastebot  view on Meta::CPAN


=item localaddr ADDRESS

Optional.  The localaddr specifies an ADDRESS that the bot will bind
to before making connections.  This allows the bot to appear online as
coming from a particular virtual host ADDRESS, if its host machine has
more than one.

=item name NAME

Required.  This is the IRC bot's internal name.  To be useful, it
should match the "irc" parameter in one of the web_server sections.

=item nick NICKNAME

Required.  Specifies the bot's nickname on the IRC network.  A bot may
have multiple nicknames, each specified as a separate configuration
line.  It will attempt to use them in order, skipping to the next in
the list as it determines each is already taken.  If every nickname is
taken, it will append numeric digits to the names and try again.

The pastebot will periodically try to reclaim one of the original
nicknames in its configuration.

=item quit QUIT_MESSAGE

This sets the pastebot's quit message should it need to log off for
any reason.

=item server SERVER PORT

Sets the IRC server and port to connect to.  Required.  The pastebot
can connect to one of several servers, each specified on a different
"server" line.  If one is unavailable, it will rotate to the next.

=item uname USER_NAME

IRC requires clients to send a short "user name" when establishing a
connection.  This parameter specifies that name.

=item use_ssl BOOLEAN

Optional.  Set this flag to a true value to connect over SSL.

=item server_pass PASSWORD

Optional.  Some IRC servers require a private password to connect.  This
parameter specifies that password.

=item nickserv_pass PASSWORD

Specifies the password to use to identify to the NickServ nickname
service.  Upon connecting to the irc server, the command
"/msg NickServ IDENTIFY PASSWORD" will be issued to identify the bot
to the NickServ service.

=back

=head2 Configuring Pastebot's Database

Pastebot must store uploaded text somewhere.

  pastes
    check   3600
    count   0
    expire  864000
    name    pasty
    store   /home/troc/.pastebot

=over 2

=item check SECONDS

How often to check for expired pastes.  The value is the number of
SECONDS between each check.  3600 is an hour, 86400 is a day.

Performing expiration checks too frequently will slow down the bot.
Currently these checks are done within the main process, which is
cooperatively multitasked.  The entire bot pauses while the check
occurs.

TODO - Revise the expiration check to work cooperatively, or fork it
into a separate process altogether.

=item count MAX_PASTES

Set a limit on the number of pastes a pastebot's database may hold,
regardless whether they're too young to expire.  This limit will be
disabled if MAX_PASTES is zero.

If set, only the MAX_PASTES newest pastes will remain after a periodic
expiration check.

=item expire MAX_AGE_SECONDS

Sets the maximum limit for the age of pastes to retain.  This limit
may be disabled if MAX_AGE_SECONDS is zero.  If set, however, pastes
that are older than MAX_AGE_SECONDS will be purged during a periodic
expiration check.

=item name NAME

Defines the database's name.  Each database must have a unique name so
they may be addressed individually.  Database names are not currently
used, but the configuration parser requires every component to be
named.

=item store DIRECTORY

Sets the absolute path of the base directory in which pastes will be
stored.  This directory will be created if it doesn't exist.  Parent
directories will not be created, however.

=back

=head1 REVERSE PROXYING

Pastebot is its own web server.  It often cannot bind to port 80
because some other web server is already there.  The recommended port
8888 may be hostile towards people behind firewalls.



( run in 1.642 second using v1.01-cache-2.11-cpan-b16cb0d3907 )