The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Protocol::IRC::Client - IRC protocol handling for a client

DESCRIPTION

This mix-in class provides a layer of IRC message handling logic suitable for an IRC client. It builds upon Protocol::IRC to provide extra message processing useful to IRC clients, such as handling inbound server numerics.

It provides some of the methods required by Protocol::IRC:

  • isupport

METHODS

$value = $irc->isupport( $key )

Returns an item of information from the server's 005 ISUPPORT lines. Traditionally IRC servers use all-capital names for keys.

$info = $irc->server_info( $key )

Returns an item of information from the server's 004 line. $key should one of

  • host

  • version

  • usermodes

  • channelmodes

INTERNAL MESSAGE HANDLING

The following messages are handled internally by Protocol::IRC::Client.

MODE (on channels) and 324 (RPL_CHANNELMODEIS)

These message involve channel modes. The raw list of channel modes is parsed into an array containing one entry per affected piece of data. Each entry will contain at least a type key, indicating what sort of mode or mode change it is:

list

The mode relates to a list; bans, invites, etc..

value

The mode sets a value about the channel

bool

The mode is a simple boolean flag about the channel

occupant

The mode relates to a user in the channel

Every mode type then provides a mode key, containing the mode character itself, and a sense key which is an empty string, +, or -.

For list and value types, the value key gives the actual list entry or value being set.

For occupant types, a flag key gives the mode converted into an occupant flag (by the prefix_mode2flag method), nick and nick_folded store the user name affected.

boolean types do not create any extra keys.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>