NAME
POEIKC::Plugin::IRC - PoCo-IKC and PoCo-IRC based irc bot.
SYNOPSIS
$ poeikcd start -M=POEIKC::Plugin::IRC -a=irc_bot -s
and then ..
$ poikc --alias=IKC_IRC -s message_respond privmsg '{"channel" => "#test","connect" => {"Nick" => "poeN","Username" => "poeU","debug" => 1,"Port" => 16667,"flood" => 1,"Ircname" => "localhost"}}' AIUEO IRoHaNiHoHeTo -D
or
$ikc_client->post_respond( 'IKC_IRC/message_respond' => ['privmsg','{"channel"=>"#test","connect"=>{"Nick"=>"poeN","Username"=>"poeU","debug"=>1,"Port"=>16667,"flood"=>1,"Ircname"=>"localhost"}}','AIUEO','IRoHaNiHoHeTo'] );
DESCRIPTION
POEIKC::Plugin::IRC is poeikcd plugin irc bot
EXAMPLES
use strict;
use Data::Dumper;
use POE::Component::IKC::ClientLite;
use Sys::Hostname;
my %param = (
ip => Sys::Hostname::hostname,
port => 47225,
name => join('_'=>Sys::Hostname::hostname, ($0 =~ /(\w+)/g), $$),
);
my $ikc = create_ikc_client(%param);
my $param = {
connect=>{
Nick=>"poeN",
Username=>"poeU",
Ircname=>"localhost",
Port=>"16667",
#debug=>1,
flood=>1,
},
channel=>"#test"
};
my $state = 'IKC_IRC/message_respond';
$ikc or die $POE::Component::IKC::ClientLite::error;
my $msg = q{
a i u e o
ka ki ku ke ko kya kyu kyo
sa si su se so sya syu syo
ta ti tu te to tya tyu tyo
na ni nu ne no nya nyu nyo
ha hi hu he ho hya hyu hyo
ma mi mu me mo mya myu myo
ya (i) yu (e) yo
ra ri ru re ro rya ryu ryo
wa (i) (u) (e) (o)
ga gi gu ge go gya gyu gyo
za zi zu ze zo zya zyu zyo
da (zi) (zu) de do (zya) (zyu) (zyo)
ba bi bu be bo bya byu byo
pa pi pu pe po pya pyu pyo
};
$ikc->post_respond( $state => ['notice' ,$param, "-- (start) --"]);
$ikc->post_respond( $state => ['privmsg' ,$param, "-- (1) --"]);
$ikc->post_respond( $state => ['privmsg', $param, "Romaji-1"]);
$ikc->post_respond( $state => ['privmsg' , $param, $msg]);
$ikc->post_respond( $state => [$param, "-- (2) --"]);
$ikc->post_respond( $state => [$param, "Romaji-2"]);
$ikc->post_respond( $state => [$param, $msg]);
$ikc->post_respond( $state => [$param, "-- (3) --"]);
$ikc->post_respond( $state => [$param, "aiueo", "irohanihoheto"]);
$ikc->post_respond( $state => [$param, ["AIUEO", "IROHANIHOHETO"]]);
$ikc->post_respond( $state => [$param, "-- (end) --"]);
print Dumper $ikc->post_respond( 'IKC_IRC/status_respond' );
print "*"x40, "\n";
$Data::Dumper::Terse=1;
$Data::Dumper::Indent=0;
$Data::Dumper::Useqq=1;
$param = Dumper $param;
my $cmd = qq{poikc --alias=IKC_IRC -s message_respond privmsg '$param' AIUEO IRoHaNiHoHeTo -D};
print $cmd,"\n";
print `$cmd`;
print "\n";
AUTHOR
Yuji Suzuki <yujisuzuki@mail.arbolbell.jp>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
poeikcd poikc POE::Component::IRC "POE::Component::IKC::ClientLite "
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 338:
L<> starts or ends with whitespace