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, 3 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

# 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.9 Version 0.5
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 elmex 1.10 Net::IRC3::Util
80    
81 elmex 1.3 Net::IRC3::Connection
82 elmex 1.2
83 elmex 1.7 Net::IRC3::Client::Connection
84 elmex 1.2
85 elmex 1.5 AnyEvent
86    
87 elmex 1.3 RFC 2812 - Internet Relay Chat: Client Protocol
88 elmex 1.1
89     BUGS
90 elmex 1.3 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 elmex 1.1
96     SUPPORT
97 elmex 1.3 You can find documentation for this module with the perldoc command.
98 elmex 1.1
99 elmex 1.3 perldoc Net::IRC3
100 elmex 1.1
101 elmex 1.3 You can also look for information at:
102 elmex 1.1
103 elmex 1.3 * AnnoCPAN: Annotated CPAN documentation
104     <http://annocpan.org/dist/Net-IRC3>
105 elmex 1.1
106 elmex 1.3 * CPAN Ratings
107     <http://cpanratings.perl.org/d/Net-IRC3>
108 elmex 1.1
109 elmex 1.3 * RT: CPAN's request tracker
110     <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-IRC3>
111 elmex 1.1
112 elmex 1.3 * Search CPAN
113     <http://search.cpan.org/dist/Net-IRC3>
114 elmex 1.1
115     ACKNOWLEDGEMENTS
116 elmex 1.3 Thanks to Marc Lehmann for the new AnyEvent module!
117 elmex 1.1
118     COPYRIGHT & LICENSE
119 elmex 1.6 Copyright 2006 Robin Redeker, all rights reserved.
120 elmex 1.1
121 elmex 1.3 This program is free software; you can redistribute it and/or modify it
122     under the same terms as Perl itself.
123 elmex 1.1