iea has asked for the wisdom of the Perl Monks concerning the following question:
I added the handler msg to react if someone writes an private msg. But i would like to know what he wrote ?use Net::IRC; $irc = new Net::IRC; $conn = $irc->newconn( Nick => 'BotRobotnnic', Server => 'irc.quakenet.org', Port => 6667, Ircname => 'Bot Robotnic'); $conn->add_global_handler('376', \&on_connect); $conn->add_handler('msg', \&on_msg); $irc->start; sub on_connect { my $self = shift; $self->join("#test"); $self->privmsg("#test", "Im boti"); } sub on_msg { my $self = shift; $self->privmsg("#test", "$WHAT DID HE WRITE"); }
It doesnt return anything. Thank$conn->add_handler('msg', \&on_msg);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: NET IRC
by moritz (Cardinal) on May 13, 2008 at 22:24 UTC | |
by iea (Beadle) on May 14, 2008 at 06:53 UTC |