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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 530
Download (untitled) / with headers
text/plain 530b
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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Charset: utf8
Message-Id: <rt-3.6.HEAD-4649-1203342087-1962.33375-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 1627
Download (untitled) / with headers
text/plain 1.5k
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.