ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-IRC3/README
Revision: 1.10
Committed: Sat Feb 24 10:24:55 2007 UTC (17 years, 5 months ago) by elmex
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +2 -0 lines
Log Message:
added further tests and improved modules

File Contents

# Content
1 NAME
2 Net::IRC3 - An event system independend IRC protocol module
3
4 VERSION
5 Version 0.5
6
7 SYNOPSIS
8 Using the simplistic Net::IRC3::Connection:
9
10 use AnyEvent;
11 use Net::IRC3::Connection;
12
13 my $c = AnyEvent->condvar;
14
15 my $con = new Net::IRC3::Connection;
16
17 $con->connect ("localhost", 6667);
18
19 $con->reg_cb (irc_001 => sub { print "$_[1]->{prefix} says i'm in the IRC: $_[1]->{trailing}!\n"; $c->broadcast; 0 });
20 $con->send_msg (undef, NICK => undef, "testbot");
21 $con->send_msg (undef, USER => 'testbot', "testbot", '*', '0');
22
23 $c->wait;
24
25 Using the more sophisticatd Net::IRC3::Client::Connection:
26
27 use AnyEvent;
28 use Net::IRC3::Client::Connection;
29
30 my $c = AnyEvent->condvar;
31
32 my $timer;
33 my $con = new Net::IRC3::Client::Connection;
34
35 $con->reg_cb (registered => sub { print "I'm in!\n"; 0 });
36 $con->reg_cb (disconnect => sub { print "I'm out!\n"; 0 });
37 $con->reg_cb (
38 sent => sub {
39 if ($_[2] eq 'PRIVMSG') {
40 print "Sent message!\n";
41 $timer = AnyEvent->timer (after => 1, cb => sub { $c->broadcast });
42 }
43 1
44 }
45 );
46
47 $con->send_srv (PRIVMSG => "Hello there i'm the cool Net::IRC3 test script!", 'elmex');
48
49 $con->connect ("localhost", 6667);
50 $con->register (qw/testbot testbot testbot/);
51
52 $c->wait;
53 undef $timer;
54
55 $con->disconnect;
56
57 DESCRIPTION
58 The Net::IRC3 module consists of Net::IRC3::Connection,
59 Net::IRC3::Client::Connection and Net::IRC3::Util. Net::IRC3 only
60 contains this documentation. It manages connections and parses and
61 constructs IRC messages.
62
63 Net::IRC3::Connection is *very* simple, if you don't want to care about
64 all the other things that a client still has to do (like replying to
65 PINGs and remembering who is on a channel), I recommend to read the
66 Net::IRC3::Client::Connection page instead.
67
68 Note that the *::Connection module uses AnyEvent as it's IO event
69 subsystem. You can integrate them into any application with a event
70 system that AnyEvent has support for (eg. Gtk2 or Event).
71
72 EXAMPLES
73 See the samples/ directory for some examples on how to use Net::IRC3.
74
75 AUTHOR
76 Robin Redeker, "<elmex@ta-sa.org>"
77
78 SEE ALSO
79 Net::IRC3::Util
80
81 Net::IRC3::Connection
82
83 Net::IRC3::Client::Connection
84
85 AnyEvent
86
87 RFC 2812 - Internet Relay Chat: Client Protocol
88
89 BUGS
90 Please report any bugs or feature requests to "bug-net-irc3 at
91 rt.cpan.org", or through the web interface at
92 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-IRC3>. I will be
93 notified, and then you'll automatically be notified of progress on your
94 bug as I make changes.
95
96 SUPPORT
97 You can find documentation for this module with the perldoc command.
98
99 perldoc Net::IRC3
100
101 You can also look for information at:
102
103 * AnnoCPAN: Annotated CPAN documentation
104 <http://annocpan.org/dist/Net-IRC3>
105
106 * CPAN Ratings
107 <http://cpanratings.perl.org/d/Net-IRC3>
108
109 * RT: CPAN's request tracker
110 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-IRC3>
111
112 * Search CPAN
113 <http://search.cpan.org/dist/Net-IRC3>
114
115 ACKNOWLEDGEMENTS
116 Thanks to Marc Lehmann for the new AnyEvent module!
117
118 COPYRIGHT & LICENSE
119 Copyright 2006 Robin Redeker, all rights reserved.
120
121 This program is free software; you can redistribute it and/or modify it
122 under the same terms as Perl itself.
123