Revision: | 1.1 |
Committed: | Mon Jul 17 16:01:04 2006 UTC (17 years, 10 months ago) by elmex |
Branch: | MAIN |
CVS Tags: | HEAD |
Log Message: | added examples and documentation |
# | Content |
---|---|
1 | #!perl |
2 | use AnyEvent; |
3 | use Net::IRC3::Connection; |
4 | |
5 | my $c = AnyEvent->condvar; |
6 | |
7 | my $con = new Net::IRC3::Connection; |
8 | |
9 | $con->connect ("localhost", 6667); |
10 | |
11 | $con->reg_cb (irc_001 => sub { print "$_[1]->{prefix} says i'm in the IRC: $_[1]->{trailing}!\n"; $c->broadcast }); |
12 | $con->send_msg (undef, NICK => undef, "testbot"); |
13 | $con->send_msg (undef, USER => 'testbot', "testbot", '*', '0'); |
14 | |
15 | $c->wait; |