in reply to Poe:Component:Irc Use of the who method.
This is a WAG (and very possibly, irrelevant and/or flat-out-wrong), but if you search the (whole) document, http://search.cpan.org/~hinrik/POE-Component-IRC-6.78/lib/POE/Component/IRC.pm (note: a PM link, created by surrounding the URL with square brackets), you'll find this example code using "$who":
sub irc_public { my ($sender, $who, $where, $what) = @_[SENDER, ARG0 .. ARG2]; my $nick = ( split /!/, $who )[0]; my $channel = $where->[0]; if ( my ($rot13) = $what =~ /^rot13 (.+)/ ) { $rot13 =~ tr[a-zA-Z][n-za-mN-ZA-M]; $irc->yield( privmsg => $channel => "$nick: $rot13" ); } return; }
which suggests an approach; an approach, only, but the referenced part of the doc says:
Lists the logged-on users matching a particular channel name, hostname, nickname, or what-have-you. Takes one optional argument: a string for it to search for. Wildcards are allowed; in the absence of this argument, it will return everyone who's currently logged in (bad move). Tack an "o" on the end if you want to list only IRCops, as per the RFC.
All told, that makes me wonder if there's some internal magic to stuff an arrayref of who instances into $nick, which is then returned.
And, for good measure, if you haven't done so already, check "whois" and "whowas." BUT, reiterating my warning, this is a WAG from a non-user of IRC and POE.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Poe:Component:Irc Use of the who method.
by shealyw2 (Initiate) on Jun 30, 2012 at 14:52 UTC |