NAME
IkuSan - IkuSan is IRC reaction bot framework.
SYNOPSIS
use utf8;
use IkuSan;
my $ikusan = IkuSan->new(
host => 'example.com',
password => '******',
enable_ssl => 1,
join_channels => [qw/test/],
);
$ikusan->on_option(
sleep => [qw/
time|t=i
die|d
/] => sub {
my ($pm, $receive, $sub, $message, %args) = @_;
$receive->privmsg($receive->{from_nickname}.": 寝ます");
for my $c (1..$args{time}) {
sleep 1;
$receive->notice("zzz…(".$c.")");
}
die if ($args{die}); # will catch
$receive->privmsg($receive->{from_nickname}.": 起きました");
},
);
$ikusan->on_command(
echo => sub {
my ($pm, $receive, $sub, $message, @args) = @_;
$receive->privmsg($receive->{from_nickname}.": ".join(" ", @args));
},
);
$ikusan->on_message(
qr/^ikusan:?/ => sub {
my ($pm, $receive, $sub, $message) = @_;
$receive->privmsg($receive->{from_nickname}.": サタデーナイトフィーバー!");
},
);
$ikusan->fever;
DESCRIPTION
IkuSan is IRC reaction bot framework. IkuSan was inspired by UnazuSan by songmu and App::Ikachan by yappo.
THE SOFTWARE IS ALPHA QUALITY. API MAY CHANGE WITHOUT NOTICE.
LICENSE
Copyright (C) mix3.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
mix3 <himachocost333@gmail.com>