App-Bondage

 view release on metacpan or  search on metacpan

lib/App/Bondage.pm  view on Meta::CPAN

    }

    if (ref $self->{config}{networks} ne 'HASH'
            || !keys %{ $self->{config}{networks} }) {
        die "No networks defined; aborted\n";
    }

    while (my ($network, $options) = each %{ $self->{config}{networks} }) {
        if (!defined $options->{server_host}) {
            die "No server_host defined for network '$network'; aborted\n";
        }
    }
    
    return;
}

# die gracefully
sub _exit {
    my ($kernel, $self) = @_[KERNEL, OBJECT];
    
    if (defined $self->{listener}) {
        delete $self->{wheels};
        delete $self->{listener};
        $self->{resolver}->shutdown();
        $kernel->signal($kernel, 'POCOIRC_SHUTDOWN', 'Caught interrupt');
    }

    $kernel->sig_handled();
    return;
}

1;

=encoding utf8

=head1 NAME

App::Bondage - A featureful IRC bouncer based on POE::Component::IRC

=head1 SYNOPSIS

 my $bouncer = App::Bondage->new(
     Debug    => $debug,
     Work_dir => $work_dir,
 );

=head1 DESCRIPTION

Bondage is an IRC bouncer. It acts as a proxy between multiple IRC servers and
multiple IRC clients. It makes it easy to stay permanently connected to IRC.
It is mostly made up of reusable components. Very little is made from scratch
here. If it is, it will be made modular and reusable, probably as a 
L<POE::Component::IRC|POE::Component::IRC> plugin. This keeps the code short
and (hopefully) well tested by others.

=head2 Rationale

I wrote Bondage because no other IRC bouncer out there fit my needs. Either
they were missing essential features, or they were implemented in an
undesirable (if not buggy) way. I've tried to make Bondage stay out of your
way and be as transparent as possible. It's supposed to be a proxy, after all.

=head1 FEATURES

=head2 Easy setup

Bondage is easy to get up and running. In the configuration file, you just
have to specify the port it will listen on, the password, and some IRC
server(s) you want Bondage to connect to. Everything else has sensible
defaults, though you might want to use a custom nickname and pick some
channels to join on connect.

=head2 Logging

Bondage can log both public and private messages for you. All log files
are saved as UTF-8.

=head2 Stays connected

Bondage will reconnect to IRC when it gets disconnected or the IRC server
stops responding.

=head2 Recall messages

Bondage can send you all the messages you missed since you detached, or it
can send you all messages received since it connected to the IRC server, or
neither. This feature is based on similar features found in miau,
dircproxy, and ctrlproxy.

=head2 Auto-away

Bondage will set your status to away when no clients are attached.

=head2 Reclaim nickname

Bondage will periodically try to change to your preferred nickname if it is
taken.

=head2 Flood protection

Bondage utilizes POE::Component::IRC's flood protection to ensure that you
never flood yourself off the IRC server.

=head2 NickServ support

Bondage can identify with NickServ for you when needed.

=head2 Rejoins channels if kicked

Bondage can try to rejoin a channel if you get kicked from it.

=head2 Encrypted passwords

Bondage supports encrypted passwords in its configuration file for added
security.

=head2 SSL support

You can connect to SSL-enabled IRC servers, and make Bondage require SSL for
client connections.



( run in 3.355 seconds using v1.01-cache-2.11-cpan-8f98c5d2c55 )