1POE::Component::IRC::PlUusgeirn:C:oBnottrTirbauftfePidOcE(P:3e:)rClomDpoocnuemnetn:t:aItRiCo:n:Plugin::BotTraffic(3)
2
3
4

NAME

6       POE::Component::IRC::Plugin::BotTraffic - A POE::Component::IRC plugin
7       that generates 'irc_bot_public' and 'irc_bot_msg' events whenever your
8       bot sends privmsgs.
9

SYNOPSIS

11         use POE::Component::IRC::Plugin::BotTraffic;
12
13         $irc->plugin_add( 'BotTraffic', POE::Component::IRC::Plugin::BotTraffic->new() );
14
15         sub irc_bot_public {
16           my ($kernel,$heap) = @_[KERNEL,HEAP];
17           my ($channel) = $_[ARG0]->[0];
18           my ($what) = $_[ARG1];
19
20           print "I said '$what' on channel $channel\n";
21         }
22

DESCRIPTION

24       POE::Component::IRC::Plugin::BotTraffic is a POE::Component::IRC plug‐
25       in. It watches for when your bot sends privmsgs to the server. If your
26       bot sends a privmsg to a channel ( ie. the recipient is prefixed with
27       '#', '&' or '+' ) it generates an 'irc_bot_public' event, otherwise it
28       will generate an 'irc_bot_msg' event.
29
30       These events are useful for logging what your bot says.
31

METHODS

33       new No arguments required. Returns a plugin object suitable for feeding
34           to POE::Component::IRC's plugin_add() method.
35

OUTPUT

37       These are the events generated by the plugin. Both events have ARG0 set
38       to an arrayref of recipients and ARG1 the text that was sent.
39
40       irc_bot_public
41           ARG0 will be an arrayref of recipients. ARG1 will be the text sent.
42
43       irc_bot_msg
44           ARG0 will be an arrayref of recipients. ARG1 will be the text sent.
45

AUTHOR

47       Chris 'BinGOs' Williams [chris@bingosnet.co.uk]
48

SEE ALSO

50       POE::Component::IRC
51
52
53
54perl v5.8.8                       200P5O-E1:0:-C2o5mponent::IRC::Plugin::BotTraffic(3)
Impressum