| POE::Filter::IRCD(3pm) | User Contributed Perl Documentation | POE::Filter::IRCD(3pm) |
POE::Filter::IRCD - A POE-based parser for the IRC protocol
version 2.44
use POE::Filter::IRCD;
my $filter = POE::Filter::IRCD->new( debug => 1, colonify => 0 );
my $arrayref = $filter->get( [ $hashref ] );
my $arrayref2 = $filter->put( $arrayref );
use POE qw(Filter::Stackable Filter::Line Filter::IRCD);
my ($filter) = POE::Filter::Stackable->new();
$filter->push( POE::Filter::Line->new( InputRegexp => '\015?\012', OutputLiteral => "\015\012" ),
POE::Filter::IRCD->new(), );
POE::Filter::IRCD provides a convenient way of parsing and creating IRC protocol lines. It provides the parsing engine for POE::Component::Server::IRC and POE::Component::IRC. A standalone version exists as Parse::IRC.
'debug', which will print all lines received to STDERR;
'colonify', set to 1 to force the filter to always colonify the last param passed in a put(),
default is 0. See below for more detail.
prefix
command
params ( this is an arrayref )
raw_line
For example, if the filter receives the following line, the following hashref is produced:
LINE: ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot'
HASHREF: {
prefix => ':moo.server.net',
command => '001',
params => [ 'lamebot', 'Welcome to the IRC network lamebot' ],
raw_line => ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot',
}
$hashref = {
command => 'PRIVMSG',
prefix => 'FooBar!foobar@foobar.com',
params => [ '#foobar', 'boo!' ],
colonify => 1, # Override the global colonify option for this record only.
};
$filter->put( [ $hashref ] );
POE
POE::Filter
POE::Filter::Stackable
POE::Component::Server::IRC
POE::Component::IRC
Parse::IRC
Chris Williams <chris@bingosnet.co.uk>
This software is copyright (c) 2013 by Chris Williams and Jonathan Steinert.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| 2018-03-30 | perl v5.26.1 |