Click here to get back home

POE::Component::IRC::State and nick changes

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
POE::Component::IRC::State and nick changes Kurt M. Weber 11-09-2007
Posted by Kurt M. Weber on November 9, 2007, 6:04 pm
Please log in for more thread options
Using POE::Component::IRC::State, I'm trying to access channels in which my
Perl program sees a user has changed his nick. This is the relevant
subroutine:

sub onnick{
my ($who,$newnick,$where) = @_[ARG0,ARG1,ARG2];
my ($nick, $host) = split /!/, $who;
my $channel = $where->[0];

my $logline = "--- " . $nick . " is now known as " . $target;

&writeline($ircserver, $channel, $logline);
}

Now, the documentation indicates that ARG2 will contain an arrayref of all
the channels on which the client saw the user change his nickname. Now,
for simplicity's sake, I'm just worried about the first one, which should
be in $where->[0].

However, it's not there.

Using Data::Dumper, I discover that ARG2 (and therefore $where) is an
arrayref, but it's empty.

Any clue what I'm missing? And yes, I am using
POE::Component::IRC::State->spawn rather than just
POE::Component::IRC->spawn.
--
Kurt M. Weber

Similar ThreadsPosted
Active state moduals July 8, 2004, 12:53 pm
POE-Component-PSD May 11, 2007, 12:58 pm
POE::Component::Client::TCP help! February 7, 2005, 12:11 pm
ANNOUNCE: POE-Component-GCS May 11, 2007, 12:42 pm
ANNOUNCEMENT: POE 0.32, an event driven component framework August 6, 2005, 4:29 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap