POE::Component::IRC::Plugin::BotTraffic(3pm)

POE::Component::IRC::Plugin::BotTraffic3pm

A poco-irc plugin that generates events when you send messages

Usage

 use POE::Component::IRC::Plugin::BotTraffic;
 $irc->plugin_add( 'BotTraffic', POE::Component::IRC::Plugin::BotTraffic->new() );
 sub irc_bot_public {
     my ($kernel, $heap) = @_[KERNEL, HEAP];
     my $channel = $_[ARG0]->[0];
     my $what = $_[ARG1];
     print "I said '$what' on channel $channel\n";
     return;
 }

Overview

POE::Component::IRC::Plugin::BotTraffic is a POE::Component::IRC plugin. It watches for when your bot sends PRIVMSGs and NOTICEs to the server and generates the appropriate events.

These events are useful for logging what your bot says.

Methods

"new"

No arguments required. Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method.

Output events

These are the events generated by the plugin. Both events have "ARG0" set to an arrayref of recipients and "ARG1" the text that was sent.

"irc_bot_public"

"ARG0" will be an arrayref of recipients. "ARG1" will be the text sent.

"irc_bot_msg"

"ARG0" will be an arrayref of recipients. "ARG1" will be the text sent.

"irc_bot_action"

"ARG0" will be an arrayref of recipients. "ARG1" will be the text sent.

"irc_bot_notice"

"ARG0" will be an arrayref of recipients. "ARG1" will be the text sent.

Releases

10 releases since Debian 4.0 (Etch); the text changed 6 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8–9
  6. 10–11
  7. 12–13

Author

Chris 'BinGOs' Williams [[email protected]]

From libpoe-component-irc-perl 6.93+dfsg-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.