POE::F...r::IRCD(3pm)

πŸ“¦
version 2.44 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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 to STDERR. loud and proud. πŸ—£οΈ
  • 'colonify' β€” set it to 1 to force the filter to always colonify the last param passed in a put(). the default is 0. 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:

  • POE
  • POE::Filter
  • POE::Filter::Stackable
  • POE::Component::Server::IRC
  • POE::Component::IRC
  • Parse::IRC

🌸 AUTHOR 🌸

Chris Williams <chris@bingosnet.co.uk> β€” thank you for your service, king. 🫢


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