ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-IRC3/README
Revision: 1.6
Committed: Mon Jul 17 16:11:32 2006 UTC (17 years, 10 months ago) by elmex
Branch: MAIN
Changes since 1.5: +1 -1 lines
Log Message:
fixed typo in copyright

File Contents

# User Rev Content
1 elmex 1.1 NAME
2 elmex 1.5 Net::IRC3 - An event system independend IRC protocol module
3 elmex 1.1
4     VERSION
5 elmex 1.5 Version 0.3
6 elmex 1.1
7     SYNOPSIS
8 elmex 1.5 Using the simplistic Net::IRC3::Connection:
9 elmex 1.2
10 elmex 1.5 use AnyEvent;
11     use Net::IRC3::Connection;
12 elmex 1.1
13 elmex 1.5 my $c = AnyEvent->condvar;
14 elmex 1.1
15 elmex 1.5 my $con = new Net::IRC3::Connection;
16 elmex 1.1
17 elmex 1.5 $con->connect ("localhost", 6667);
18 elmex 1.2
19 elmex 1.5 $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 elmex 1.2
23 elmex 1.5 $c->wait;
24 elmex 1.4
25 elmex 1.5 Using the more sophisticatd Net::IRC3::Client::Connection:
26 elmex 1.2
27 elmex 1.5 use AnyEvent;
28     use Net::IRC3::Client::Connection;
29 elmex 1.2
30 elmex 1.5 my $c = AnyEvent->condvar;
31 elmex 1.3
32 elmex 1.5 my $timer;
33     my $con = new Net::IRC3::Client::Connection;
34 elmex 1.3
35 elmex 1.5 $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 elmex 1.2
47 elmex 1.5 $con->send_srv (PRIVMSG => "Hello there i'm the cool Net::IRC3 test script!", 'elmex');
48 elmex 1.3
49 elmex 1.5 $con->connect ("localhost", 6667);
50     $con->register (qw/testbot testbot testbot/);
51 elmex 1.3
52 elmex 1.5 $c->wait;
53     undef $timer;
54 elmex 1.2
55 elmex 1.5 $con->disconnect;
56 elmex 1.2
57 elmex 1.5 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 elmex 1.2
72 elmex 1.3 EXAMPLES
73     See the samples/ directory for some examples on how to use Net::IRC3.
74 elmex 1.2
75 elmex 1.3 AUTHOR
76     Robin Redeker, "<elmex@ta-sa.org>"
77 elmex 1.2
78 elmex 1.3 SEE ALSO
79     Net::IRC3::Connection
80 elmex 1.2
81 elmex 1.3 Net::IRC3::Client
82 elmex 1.2
83 elmex 1.5 AnyEvent
84    
85 elmex 1.3 RFC 2812 - Internet Relay Chat: Client Protocol
86 elmex 1.1
87     BUGS
88 elmex 1.3 Please report any bugs or feature requests to "bug-net-irc3 at
89     rt.cpan.org", or through the web interface at
90     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-IRC3>. I will be
91     notified, and then you'll automatically be notified of progress on your
92     bug as I make changes.
93 elmex 1.1
94     SUPPORT
95 elmex 1.3 You can find documentation for this module with the perldoc command.
96 elmex 1.1
97 elmex 1.3 perldoc Net::IRC3
98 elmex 1.1
99 elmex 1.3 You can also look for information at:
100 elmex 1.1
101 elmex 1.3 * AnnoCPAN: Annotated CPAN documentation
102     <http://annocpan.org/dist/Net-IRC3>
103 elmex 1.1
104 elmex 1.3 * CPAN Ratings
105     <http://cpanratings.perl.org/d/Net-IRC3>
106 elmex 1.1
107 elmex 1.3 * RT: CPAN's request tracker
108     <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-IRC3>
109 elmex 1.1
110 elmex 1.3 * Search CPAN
111     <http://search.cpan.org/dist/Net-IRC3>
112 elmex 1.1
113     ACKNOWLEDGEMENTS
114 elmex 1.3 Thanks to Marc Lehmann for the new AnyEvent module!
115 elmex 1.1
116     COPYRIGHT & LICENSE
117 elmex 1.6 Copyright 2006 Robin Redeker, all rights reserved.
118 elmex 1.1
119 elmex 1.3 This program is free software; you can redistribute it and/or modify it
120     under the same terms as Perl itself.
121 elmex 1.1