Skip Menu |

This queue is for tickets about the POE-Component-IRC CPAN distribution.

Report information
The Basics
Id: 33375
Status: resolved
Worked: 30 min
Priority: 0/
Queue: POE-Component-IRC

People
Owner: BINGOS [...] cpan.org
Requestors: ajcave [...] ualberta.ca
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.64
Fixed in: (no value)



Subject: IRC "PART" parsing incorrectly handles part message
I believe there is an issue in POE::Filter::IRC having to do with parsing IRC "PART" lines. POE::Component::IRC states that for irc_part events, ARG1 is the channel name and ARG2 is the parting message. However, it seems the parting message is being grouped together with the channel. Here's a snippet of code to demonstrate: my $filter = POE::Filter::IRC->new(); my $part = ':joe!joe@example.com PART #foo :Goodbye'; print $filter->get([$part])->[0]{args}[1]; Prints: #foo :Goodbye While I expect: #foo
On Mon Feb 18 00:04:20 2008, ajcave wrote: Show quoted text
> I believe there is an issue in POE::Filter::IRC having to do with > parsing IRC "PART" lines. POE::Component::IRC states that for irc_part > events, ARG1 is the channel name and ARG2 is the parting message. > However, it seems the parting message is being grouped together with the > channel. > > Here's a snippet of code to demonstrate: > > my $filter = POE::Filter::IRC->new(); > my $part = ':joe!joe@example.com PART #foo :Goodbye'; > print $filter->get([$part])->[0]{args}[1]; > > Prints: > > #foo :Goodbye > > While I expect: > > #foo
Hi, Thanks for the ticket. POE::Filter::IRC does indeed seem to exhibit that behaviour. POE::Component::IRC itself hasn't used POE::Filter::IRC for processing incoming traffic for a long while now. It uses a POE::Filter::Stackable with POE::Filter::IRCD and POE::Filter::IRC::Compat. - use strict; use warnings; use POE::Filter::Stackable; use POE::Filter::IRCD; use POE::Filter::IRC::Compat; my $filter = POE::Filter::Stackable->new( Filters => [ POE::Filter::IRCD->new(), POE::Filter::IRC::Compat->new(), ], ); my $part = ':joe!joe@example.com PART #foo :Goodbye'; print $filter->get([$part])->[0]{args}[1], "\n"; - This produces '#foo'. POE::Filter::IRC has only been retained in case anyone has been using it outside of POE::Component::IRC as a standalone filter. I will very likely refactor the internals soonish to make it basically a wrapper to the above stackable construct. Many thanks, Chris 'BinGOs' Williams