Subject: | Spoofed nicks don't have a real name |
Date: | Thu, 28 Sep 2006 22:31:54 +0200 |
To: | bug-POE-Component-Server-IRC [...] rt.cpan.org |
From: | David Serrano <dserrano5 [...] yahoo.es> |
I've found that, when joining a channel with spoofed nicks, some "unitialized
value" messages appear. This is probably caused by my client performing a /who
on the channel. To reproduce it:
#!/usr/bin/perl
use strict;
use warnings;
use POE;
use POE::Component::Server::IRC;
my $pocosi = POE::Component::Server::IRC->spawn;
sub _start {
$pocosi->yield ('register');
$pocosi->add_listener (port => 6667);
$pocosi->yield ('add_spoofed_nick', { nick => 'root' });
print "ready\n";
}
POE::Session->create (package_states => [ 'main' => [ '_start' ] ]);
$poe_kernel->run();
Simply doing a "/whois root" triggers these:
Use of uninitialized value in pattern match (m//) at /usr/share/perl5/POE/Filter/IRCD.pm line 143.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/POE/Filter/IRCD.pm line 144.
I believe that this is caused by the fact that the spoofed nicks don't have a
real name. The warnings disappear as soon as I stick a line:
$record->{ircname} = 'foo';
into POE/Component/Server/IRC.PM, function add_spoofed_nick().
This happens with version 0.99_04. I've checked that the code of the function
in version 1.01 is identical (using copy, paste and /usr/bin/diff) so I think
it's safe to say that 1.01 is also affected.
--
David Serrano - http://hue-bond.blogspot.com