Event(3) User Contributed Perl Documentation Event(3)NAME
Net::IRC::Event - A class for passing event data between subroutines
SYNOPSIS
None yet. These docs are under construction.
DESCRIPTION
This documentation is a subset of the main Net::IRC documentation. If
you haven't already, please "perldoc Net::IRC" before continuing.
Net::IRC::Event defines a standard interface to the salient information
for just about any event your client may witness on IRC. It's about as
close as we can get in Perl to a struct, with a few extra nifty
features thrown in.
METHOD DESCRIPTIONS
This section is under construction, but hopefully will be finally
written up by the next release. Please see the "irctest" script and the
source for details about this module.
LIST OF EVENTS
Net::IRC is an entirely event-based system, which takes some getting
used to at first. To interact with the IRC server, you tell Net::IRC's
server connection to listen for certain events and activate your own
subroutines when they occur. Problem is, this doesn't help you much if
you don't know what to tell it to look for. Below is a list of the
possible events you can pass to Net::IRC, along with brief descriptions
of each... hope this helps.
Common events
· nick
The "nick" event is triggered when the client receives a NICK
message, meaning that someone on a channel with the client has
changed eir nickname.
· quit
The "quit" event is triggered upon receipt of a QUIT message, which
means that someone on a channel with the client has disconnected.
· join
The "join" event is triggered upon receipt of a JOIN message, which
means that someone has entered a channel that the client is on.
· part
The "part" event is triggered upon receipt of a PART message, which
means that someone has left a channel that the client is on.
· mode
The "mode" event is triggered upon receipt of a MODE message, which
means that someone on a channel with the client has changed the
channel's parameters.
· topic
The "topic" event is triggered upon receipt of a TOPIC message,
which means that someone on a channel with the client has changed
the channel's topic.
· kick
The "kick" event is triggered upon receipt of a KICK message, which
means that someone on a channel with the client (or possibly the
client itself!) has been forcibly ejected.
· public
The "public" event is triggered upon receipt of a PRIVMSG message
to an entire channel, which means that someone on a channel with
the client has said something aloud.
· msg
The "msg" event is triggered upon receipt of a PRIVMSG message
which is addressed to one or more clients, which means that someone
is sending the client a private message. (Duh. :-)
· notice
The "notice" event is triggered upon receipt of a NOTICE message,
which means that someone has sent the client a public or private
notice. (Is that sufficiently vague?)
· ping
The "ping" event is triggered upon receipt of a PING message, which
means that the IRC server is querying the client to see if it's
alive. Don't confuse this with CTCP PINGs, explained later.
· other
The "other" event is triggered upon receipt of any number of
unclassifiable miscellaneous messages, but you're not likely to see
it often.
· invite
The "invite" event is triggered upon receipt of an INVITE message,
which means that someone is permitting the client's entry into a +i
channel.
· kill
The "kill" event is triggered upon receipt of a KILL message, which
means that an IRC operator has just booted your sorry arse offline.
Seeya!
· disconnect
The "disconnect" event is triggered when the client loses its
connection to the IRC server it's talking to. Don't confuse it with
the "leaving" event. (See below.)
· leaving
The "leaving" event is triggered just before the client
deliberately closes a connection to an IRC server, in case you want
to do anything special before you sign off.
· umode
The "umode" event is triggered when the client changes its personal
mode flags.
· error
The "error" event is triggered when the IRC server complains to you
about anything. Sort of the evil twin to the "other" event,
actually.
CTCP Requests
· cping
The "cping" event is triggered when the client receives a CTCP PING
request from another user. See the irctest script for an example of
how to properly respond to this common request.
· cversion
The "cversion" event is triggered when the client receives a CTCP
VERSION request from another client, asking for version info about
its IRC client program.
· csource
The "csource" event is triggered when the client receives a CTCP
SOURCE request from another client, asking where it can find the
source to its IRC client program.
· ctime
The "ctime" event is triggered when the client receives a CTCP TIME
request from another client, asking for the local time at its end.
· cdcc
The "cdcc" event is triggered when the client receives a DCC
request of any sort from another client, attempting to establish a
DCC connection.
· cuserinfo
The "cuserinfo" event is triggered when the client receives a CTCP
USERINFO request from another client, asking for personal
information from the client's user.
· cclientinfo
The "cclientinfo" event is triggered when the client receives a
CTCP CLIENTINFO request from another client, asking for whatever
the hell "clientinfo" means.
· cerrmsg
The "cerrmsg" event is triggered when the client receives a CTCP
ERRMSG request from another client, notifying it of a protocol
error in a preceding CTCP communication.
· cfinger
The "cfinger" event is triggered when the client receives a CTCP
FINGER request from another client. How to respond to this should
best be left up to your own moral stance.
· caction
The "caction" event is triggered when the client receives a CTCP
ACTION message from another client. I should hope you're getting
the hang of how Net::IRC handles CTCP requests by now...
CTCP Responses
· crping
The "crping" event is triggered when the client receives a CTCP
PING response from another user. See the irctest script for an
example of how to properly respond to this common event.
· crversion
The "crversion" event is triggered when the client receives a CTCP
VERSION response from another client.
· crsource
The "crsource" event is triggered when the client receives a CTCP
SOURCE response from another client.
· crtime
The "crtime" event is triggered when the client receives a CTCP
TIME response from another client.
· cruserinfo
The "cruserinfo" event is triggered when the client receives a CTCP
USERINFO response from another client.
· crclientinfo
The "crclientinfo" event is triggered when the client receives a
CTCP CLIENTINFO response from another client.
· crfinger
The "crfinger" event is triggered when the client receives a CTCP
FINGER response from another client. I'm not even going to consider
making a joke about this one.
DCC Events
· dcc_open
The "dcc_open" event is triggered when a DCC connection is
established between the client and another client.
· dcc_update
The "dcc_update" event is triggered when any data flows over a DCC
connection. Useful for doing things like monitoring file transfer
progress, for instance.
· dcc_close
The "dcc_close" event is triggered when a DCC connection closes,
whether from an error or from natural causes.
· chat
The "chat" event is triggered when the person on the other end of a
DCC CHAT connection sends you a message. Think of it as the private
equivalent of "msg", if you will.
Numeric Events
· There's a whole lot of them, and they're well-described elsewhere.
Please see the IRC RFC (1495, at
http://cs-ftp.bu.edu/pub/irc/support/IRC_RFC ) for a detailed
description, or the Net::IRC::Event.pm source code for a quick
list.
AUTHORS
Conceived and initially developed by Greg Bacon <gbacon@adtran.com> and
Dennis Taylor <dennis@funkplanet.com>.
Ideas and large amounts of code donated by Nat "King" Torkington
<gnat@frii.com>.
Currently being hacked on, hacked up, and worked over by the members of
the Net::IRC developers mailing list. For details, see
http://www.execpc.com/~corbeau/irc/list.html .
URL
Up-to-date source and information about the Net::IRC project can be
found at http://netirc.betterbox.net/ .
SEE ALSO
· perl(1).
· RFC 1459: The Internet Relay Chat Protocol
· http://www.irchelp.org/, home of fine IRC resources.
perl v5.14.0 2003-09-24 Event(3)