POE::F...r::IRCD(3pm)
π POE::Filter::IRCD β the manual page, but make it make sense π
okay bestie, welcome to the User Contributed Perl Documentation page for POE::Filter::IRCD. pull up a chair, grab a boba, we're parsing IRC protocol lines and we're gonna have a TIME. β¨
πΈ NAME πΈ
POE::Filter::IRCD β a POE-based parser for the IRC protocol. yes. that's literally it. she parses. she's a filter. she's iconic. π
π VERSION π
version 2.44 β no cap, that's the one. β
β¨ SYNOPSIS β¨
here's the vibe in code form, bestie. copy it, love it, run it:
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(), );
see how she just slots into a stackable filter? that's the whole point. stacking is the moment. π«Ά
π¦ DESCRIPTION π¦
so POE::Filter::IRCD is your girl for parsing and creating IRC protocol lines. she's not just a vibe, she's infrastructure β she's the actual parsing engine behind POE::Component::Server::IRC and POE::Component::IRC. main character behavior, honestly. π
and if you want her standalone, there's a whole separate version out there living her own life under the name Parse::IRC. we love a spin-off. π
π CONSTRUCTOR π
new
creates a brand new POE::Filter::IRCD object. she takes two optional arguments, and they are:
'debug'β this one will print all lines received straight toSTDERR. loud and proud. π£οΈ'colonify'β set it to1to force the filter to always colonify the last param passed in aput(). the default is0. more on this below, bestie, don't worry.
π METHODS π
get_one_start
get_one
get_pending
get
takes an arrayref that contains lines of IRC-formatted input. returns an arrayref of hashrefs that represents those lines. each hashref is holding these fields, periodt:
prefix
command
params ( this is an arrayref )
raw_line
for example β if the filter receives this line:
LINE: ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot'
then this is the hashref it produces:
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',
}
look at her go. π₯Ή the raw_line is literally the same line. she keeps receipts. fr fr.
put
takes an arrayref containing hashrefs of IRC data and returns an arrayref containing IRC-formatted lines. optionally, you can specify 'colonify' to override the global colonification option. here's the example, verbatim, don't @ me:
$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 ] );
note: that colonify => 1 is a per-record override β it only applies to that one record. the global option stays exactly where it was. π
clone
makes a copy of the filter and clears the copy's buffer. fresh start, clean slate, new era. π§
debug
hand it a true or false argument and it'll enable or disable debug output respectively. and if you give it no argument at all? the behavior is to toggle the debug status. she's a little chaos gremlin like that. π
π SEE ALSO π
go read these too, bestie, they're all in the family:
POEPOE::FilterPOE::Filter::StackablePOE::Component::Server::IRCPOE::Component::IRCParse::IRC
πΈ AUTHOR πΈ
Chris Williams <chris@bingosnet.co.uk> β thank you for your service, king. π«Ά
π COPYRIGHT AND LICENSE π
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. slay. π
and that's the whole page, bestie!! π this was perl version v5.26.1, dated 2018-03-30, and it's giving absolutely iconic documentation energy. go parse some IRC, you got this. mwah. π
β¨π
π¦ where this page comes from
- debian bookworm: libpoe-filter-ircd-perl 2.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libpoe-filter-ircd-perl 2.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libpoe-filter-ircd-perl 2.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libpoe-filter-ircd-perl 2.44-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms