1POE::Component::IRC::PlUusgeirn:C:oCnTtCrPi(b3u)ted PerlPODEo:c:uCmoemnptoanteinotn::IRC::Plugin::CTCP(3)
2
3
4

NAME

6       POE::Component::IRC::Plugin::CTCP - A POE::Component::IRC plugin that
7       auto-responds to CTCP requests.
8

SYNOPSIS

10         use strict;
11         use warnings;
12         use POE qw(Component::IRC Component::IRC::Plugin::CTCP);
13
14         my ($nickname) = 'Flibble' . $$;
15         my ($ircname) = 'Flibble the Sailor Bot';
16         my ($ircserver) = 'irc.blahblahblah.irc';
17         my ($port) = 6667;
18
19         my ($irc) = POE::Component::IRC->spawn(
20               nick => $nickname,
21               server => $ircserver,
22               port => $port,
23               ircname => $ircname,
24         ) or die "Oh noooo! $!";
25
26         POE::Session->create(
27               package_states => [
28                       'main' => [ qw(_start) ],
29               ],
30         );
31
32         $poe_kernel->run();
33         exit 0;
34
35         sub _start {
36           # Create and load our CTCP plugin
37           $irc->plugin_add( 'CTCP' =>
38               POE::Component::IRC::Plugin::CTCP->new( version => $ircname, userinfo => $ircname ) );
39
40           $irc->yield( register => 'all' );
41           $irc->yield( connect => { } );
42           undef;
43         }
44

DESCRIPTION

46       POE::Component::IRC::Plugin::CTCP is a POE::Component::IRC plugin. It
47       watches for 'irc_ctcp_version', 'irc_ctcp_userinfo' and 'irc_ctcp_time'
48       events and autoresponds on your behalf.
49

CONSTRUCTOR

51       new Takes a number of optional arguments:
52
53              'version', a string to send in response to 'irc_ctcp_version'. Default is PoCo-IRC and version;
54              'userinfo', a string to send in response to 'irc_ctcp_userinfo'. Default is 'm33p';
55              'eat', by default the plugin uses PCI_EAT_CLIENT, set this to 0 to disable this behaviour;
56
57           Returns a plugin object suitable for feeding to POE::Compo‐
58           nent::IRC's plugin_add() method.
59

METHODS

61       eat With no arguments, returns true or false on whether the plugin is
62           "eating" ctcp events that it has dealt with. An argument will set
63           "eating" to on or off appropriately, depending on whether the value
64           is true or false.
65

AUTHOR

67       Chris 'BinGOs' Williams
68

SEE ALSO

70       CTCP Specification <http://www.irchelp.org/irchelp/rfc/ctcpspec.html>.
71
72
73
74perl v5.8.8                       2005-10-2P5OE::Component::IRC::Plugin::CTCP(3)
Impressum