Subject: | POE::Filter::IRC::Compat->get_one should not return undef |
get_one must return ARRAYREF, but POE::Filter::IRC::Compat->get_one
returns undef when get invalid ctcp command.
follow is a patch =)
=== lib/POE/Filter/IRC/Compat.pm
==================================================================
--- lib/POE/Filter/IRC/Compat.pm (revision 26515)
+++ lib/POE/Filter/IRC/Compat.pm (local)
@@ -285,7 +285,7 @@
sub _get_ctcp {
my ($self, $line) = @_;
- my ($who, $type, $where, $msg) = ($line =~ /^:(\S+) +(\S+) +(\S+)
+:?(.*)$/) or return;
+ my ($who, $type, $where, $msg) = ($line =~ /^:(\S+) +(\S+) +(\S+)
+:?(.*)$/) or return [];
# Is this a CTCP request or reply?
$type = $type eq 'PRIVMSG' ? 'ctcp' : 'ctcpreply';