AnyEvent-IRC

 view release on metacpan or  search on metacpan

lib/AnyEvent/IRC/Client.pm  view on Meta::CPAN


Emitted when C<@nicks> are added to the channel C<$channel>,
this happens for example when someone JOINs a channel or when you
get a RPL_NAMREPLY (see RFC1459).


C<$msg> is the IRC message hash that as returned by C<parse_irc_msg>.

=item channel_remove => $msg, $channel, @nicks

Emitted when C<@nicks> are removed from the channel C<$channel>,
happens for example when they PART, QUIT or get KICKed.

C<$msg> is the IRC message hash that as returned by C<parse_irc_msg>
or undef if the reason for the removal was a disconnect on our end.

=item channel_change => $msg, $channel, $old_nick, $new_nick, $is_myself

Emitted when a nickname on a channel changes. This is emitted when a NICK
change occurs from C<$old_nick> to C<$new_nick> give the application a chance
to quickly analyze what channels were affected.  C<$is_myself> is true when
yourself was the one who changed the nick.

=item channel_nickmode_update => $channel, $dest

This event is emitted when the (user) mode (eg. op status) of an occupant of
a channel changes. C<$dest> is the nickname on the C<$channel> who's mode was
updated.

=item channel_topic => $channel, $topic, $who

This is emitted when the topic for a channel is discovered. C<$channel>
is the channel for which C<$topic> is the current topic now.
Which is set by C<$who>. C<$who> might be undefined when it's not known
who set the channel topic.

=item ident_change => $nick, $ident

Whenever the user and host of C<$nick> has been determined or a change
happened this event is emitted.

=item join => $nick, $channel, $is_myself

Emitted when C<$nick> enters the channel C<$channel> by JOINing.
C<$is_myself> is true if yourself are the one who JOINs.

=item part => $nick, $channel, $is_myself, $msg

Emitted when C<$nick> PARTs the channel C<$channel>.
C<$is_myself> is true if yourself are the one who PARTs.
C<$msg> is the PART message.

=item kick => $kicked_nick, $channel, $is_myself, $msg, $kicker_nick

Emitted when C<$kicked_nick> is KICKed from the channel C<$channel> by
C<$kicker_nick>.  C<$is_myself> is true if yourself are the one who got KICKed.
C<$msg> is the KICK message.

=item nick_change => $old_nick, $new_nick, $is_myself

Emitted when C<$old_nick> is renamed to C<$new_nick>.
C<$is_myself> is true when yourself was the one who changed the nick.

=item away_status_change => $bool

Emitted whenever a presence/away status change for you was detected.
C<$bool> is true if you are now away, or false/undef if you are not
away anymore.

You can change your away status by emitting the C<AWAY> IRC command:

   $cl->send_srv (AWAY => "I'm not here right now");

Or reset it:

   $cl->send_srv ('AWAY');

=item ctcp => $src, $target, $tag, $msg, $type

Emitted when a CTCP message was found in either a NOTICE or PRIVMSG
message. C<$tag> is the CTCP message tag. (eg. "PING", "VERSION", ...).
C<$msg> is the CTCP message and C<$type> is either "NOTICE" or "PRIVMSG".

C<$src> is the source nick the message came from.
C<$target> is the target nickname (yours) or the channel the ctcp was sent
on.

=item "ctcp_$tag", => $src, $target, $msg, $type

Emitted when a CTCP message was found in either a NOTICE or PRIVMSG
message. C<$tag> is the CTCP message tag (in lower case). (eg. "ping", "version", ...).
C<$msg> is the CTCP message and C<$type> is either "NOTICE" or "PRIVMSG".

C<$src> is the source nick the message came from.
C<$target> is the target nickname (yours) or the channel the ctcp was sent
on.

=item dcc_ready => $id, $dest, $type, $local_ip, $local_port

Whenever a locally initiated DCC request is made this event is emitted
after the listening socket has been setup.

C<$id> is the DCC connection ID.

C<$dest> and C<$type> are the destination and type of the DCC request.

C<$local_ip> is the C<$local_ip> argument passed to C<start_dcc> or
the IP the socket is bound to.

C<$local_port> is the TCP port is the socket is listening on.

=item dcc_request => $id, $src, $type, $arg, $addr, $port

Whenever we receive a DCC offer from someone else this event is emitted.
C<$id> is the DCC connection ID, C<$src> is his nickname, C<$type> is the DCC
type in lower cases (eg. 'chat').  C<$arg> is the DCC type argument. C<$addr>
is the IP address we can reach him at in ASCII encoded human readable form (eg.
something like "127.0.0.1").  And C<$port> is the TCP port we have to connect
to.

To answer to his request you can just call C<dcc_accept> with the C<$id>.



( run in 1.081 second using v1.01-cache-2.11-cpan-39bf76dae61 )