NAME

Net::IRC3::Client::Connection - A highlevel IRC connection

SYNOPSIS

use Net::IRC3::Client;

my $irc3 = new Net::IRC3::Client;

my $con = $irc3->connect ("test.not.at.irc.net", 6667);

$con->register ("fancybot", "fancybot", "Mr. Fancybot");

...

DESCRIPTION

Net::IRC3 itself is a simple building block for an IRC client. It manages connections and parses and constructs IRC messages.

Net::IRC3 is very simple, if you don't want to care about all the other things that a client still has to do (like replying to PINGs and remembering who is on a channel), I recommend to read the Net::IRC3::Client page instead.

METHODS

register ($nick, $user, $real)

This function registers all the callbacks it needs and then sends the IRC registration commands NICK and USER.

nick ()

Returns the current nickname, under which this connection is registered at the IRC server. It might be different from the one that was passed to register as a nick-collision might happened on login.

channel_list ()

This returns a key value list of all channels this connection is currently JOINed. The keys are the channel name and the values are hash references.

send_srv (@ircmsg)

This function sends an IRC message that is constructed by mk_msg (@ircmsg) (see Net::IRC3). If the connection isn't yet registered (for example if the connection is slow) and hasn't got a welcome (IRC command 001) from the server yet, the IRC message is queued until it gets a welcome.

clear_srv_queue

Clears the server send queue.

send_chan ($channel, @ircmsg)

This function sends a message to server, like send_srv only that it will queue the messages if it hasn't joined the channel $channel yet. The queued messages will be send once the connection successfully joined the $channel.

clear_chan_queue ($channel)

Clears the channel queue of the channel $channel.

EXAMPLES

See samples/netirc3cl and other samples in samples/ for some examples on how to use Net::IRC3::Client::Connection.

AUTHOR

Robin Redeker, <elmex@ta-sa.org>

SEE ALSO

Net::IRC3

Net::IRC3::Client

Net::IRC3::Client::Connection

RFC 2812 - Internet Relay Chat: Client Protocol

COPYRIGHT & LICENSE

Copyright 2006 Robin Redker, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.