Alastair Douglas > Bot-R9K-0.01 > Bot::R9K

Download:
Bot-R9K-0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Bot::R9K

SYNOPSIS ^

    use POE qw(Component::IRC);
    use Bot::R9K;

    my $irc = POE::Component::IRC->spawn(
        nick        => 'Bot-R9K',
        server      => 'irc.botnet.org',
        port        => 6667,
        ircname     => 'R9K',
        username    => 'r9k',
        debug       => 1,
    );

    POE::Session->create(
        package_states => [
            main => [ qw(_start irc_001) ],
        ],
    );

    $poe_kernel->run;

    sub _start {
        $irc->yield( register => 'all' );
        
        $irc->plugin_add(
            'R9K' =>
                Bot::R9K->new
        );

        $irc->yield( connect => {} );
    }

    sub irc_001 {
        $_[kernel]->post( $_[sender] => join => '#channel' );
    }

DESCRIPTION ^

Bot::R9K is a PoCo::IRC plugin that runs an R9K bot for you. The R9K bot watches for repeated messages and silences anyone who says something that has been said before. The more times it has been said, the longer the silence.

Remember to op your bot when it joins.

METHODS ^

new

Create a new bot: see SYNOPSIS.

Options

ignore

An array ref of regexes to ignore. They are tested against the full nick (with the ! and the @ and everything).

exceptions

An array ref of regexes defining exempt messages.

punishment

A subref. This will be passed [c]$self[/c], [c]$nick[/c] and [c]$chan[/c]. Do what you want; the default is to remove voice and ban (but not kick).

unpunishment

A subref. Receives the same info as [c]punishment[/c]. Use this to reverse the punishment. By default it removes the ban and sets voice, regardless of whether the user originally had voice (the point of the bot is rather that you can silence people, so everyone who is not silenced should have voice).

DO WHAT, SON? ^

R9K is short for ROBOT9000 and that is a thing that enforces originality by punishing you for saying something that someone else has said before.

Here is an xkcd blog post explaining what the R9K bot does. http://blog.xkcd.com/2008/01/14/robot9000-and-xkcd-signal-attacking-noise-in-chat/

BUGS ^

Dunno.

Report bugs at http://github.com/Altreus/Bot-R9K/issues

AUTHOR ^

Alastair McGowan-Douglas (Altreus)

LICENCE ^

This module is released under the X11/MIT licence, as found here http://www.opensource.org/licenses/mit-license.php

syntax highlighting: