NAME

Horris::Connection::Plugin - Base Package of Plugins

VERSION

version v0.1.2

SYNOPSIS

package Horris::Connection::Plugin::Foo;
use Moose;
with qw/Horris::Connection::Plugin MooseX::Role::Pluggable::Plugin/;

# override member variables if you want.
has '+is_enable' => (
    default => 0	# $self->is_enable is false
);

sub init {
    # initialize plugin stuff here
}

sub on_connect {
    # implement on_connect stuff here
}

sub on_disconnect {
    # implement on_disconnect stuff here
}

sub irc_privmsg {
    my ($self, $message) = @_;
    #	this hook method will called by Horris::Connection
    #	when 'irc_privmsg' event occur in joinning irc channels
    #	see the AnyEvent::IRC::Client for 'irc_privmsg' more detail
    #
    # implement irc_privmsg stuff here
}

sub on_privatemsg {
    my ($self, $nick, $message) = @_;
    # this hook method will called when who send a private message to
    # your bot. 
}

__PACKAGE__->meta->make_immutable;

# see the documentation for MooseX::Role::Pluggable,
# MooseX::Role::Pluggable::Plugin for info on how to get your Moose
# class to use this plugin...

SEE ALSO

MooseX::Role::Pluggable MooseX::Role::Pluggable::Plugin Horris::Connection

AUTHOR

hshong <hshong@perl.kr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by hshong.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.