Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::component::irc::plugin::ctcp(3pm) [debian man page]

POE::Component::IRC::Plugin::CTCP(3pm)			User Contributed Perl Documentation		    POE::Component::IRC::Plugin::CTCP(3pm)

NAME
POE::Component::IRC::Plugin::CTCP - A PoCo-IRC plugin that auto-responds to CTCP requests SYNOPSIS
use strict; use warnings; use POE qw(Component::IRC Component::IRC::Plugin::CTCP); my $nickname = 'Flibble' . $$; my $ircname = 'Flibble the Sailor Bot'; my $ircserver = 'irc.blahblahblah.irc'; my $port = 6667; my $irc = POE::Component::IRC->spawn( nick => $nickname, server => $ircserver, port => $port, ircname => $ircname, ) or die "Oh noooo! $!"; POE::Session->create( package_states => [ main => [ qw(_start) ], ], ); $poe_kernel->run(); sub _start { # Create and load our CTCP plugin $irc->plugin_add( 'CTCP' => POE::Component::IRC::Plugin::CTCP->new( version => $ircname, userinfo => $ircname, )); $irc->yield( register => 'all' ); $irc->yield( connect => { } ); return: } DESCRIPTION
POE::Component::IRC::Plugin::CTCP is a POE::Component::IRC plugin. It watches for "irc_ctcp_version", "irc_ctcp_userinfo", "irc_ctcp_ping", "irc_ctcp_time" and "irc_ctcp_source" events and autoresponds on your behalf. METHODS
"new" Takes a number of optional arguments: 'version', a string to send in response to "irc_ctcp_version". Default is PoCo-IRC and version; 'clientinfo', a string to send in response to "irc_ctcp_clientinfo". Default is <http://search.cpan.org/perldoc?POE::Component::IRC::Plugin::CTCP>. 'userinfo', a string to send in response to "irc_ctcp_userinfo". Default is 'm33p'; 'source', a string to send in response to "irc_ctcp_source". Default is http://search.cpan.org/dist/POE-Component-IRC <http://search.cpan.org/dist/POE-Component-IRC>. 'eat', by default the plugin uses PCI_EAT_CLIENT, set this to 0 to disable this behaviour; Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. "eat" With no arguments, returns true or false on whether the plugin is "eating" CTCP events that it has dealt with. An argument will set "eating" to on or off appropriately, depending on whether the value is true or false. AUTHOR
Chris 'BinGOs' Williams SEE ALSO
CTCP Specification <http://www.irchelp.org/irchelp/rfc/ctcpspec.html>. perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::CTCP(3pm)

Check Out this Related Man Page

POE::Component::IRC::Plugin::AutoJoin(3pm)		User Contributed Perl Documentation		POE::Component::IRC::Plugin::AutoJoin(3pm)

NAME
POE::Component::IRC::Plugin::AutoJoin - A PoCo-IRC plugin which keeps you on your favorite channels SYNOPSIS
use POE qw(Component::IRC::State Component::IRC::Plugin::AutoJoin); my $nickname = 'Chatter'; my $server = 'irc.blahblahblah.irc'; my %channels = ( '#Blah' => '', '#Secret' => 'secret_password', '#Foo' => '', ); POE::Session->create( package_states => [ main => [ qw(_start irc_join) ], ], ); $poe_kernel->run(); sub _start { my $irc = POE::Component::IRC::State->spawn( Nick => $nickname, Server => $server, ) or die "Oh noooo! $!"; $irc->plugin_add('AutoJoin', POE::Component::IRC::Plugin::AutoJoin->new( Channels => \%channels )); $irc->yield(register => qw(join); $irc->yield(connect => { } ); } sub irc_join { my $chan = @_[ARG1]; $irc->yield(privmsg => $chan => "hi $channel!"); } DESCRIPTION
POE::Component::IRC::Plugin::AutoJoin is a POE::Component::IRC plugin. If you get disconnected, the plugin will join all the channels you were on the next time it gets connected to the IRC server. It can also rejoin a channel if the IRC component gets kicked from it. It keeps track of channel keys so it will be able to rejoin keyed channels in case of reconnects/kicks. If a POE::Component::IRC::Plugin::NickServID plugin has been added to the IRC component, then AutoJoin will wait for a reply from NickServ before joining channels on connect. This plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. METHODS
"new" Takes the following optional arguments: 'Channels', either an array reference of channel names, or a hash reference keyed on channel name, containing the password for each channel. By default it uses the channels the component is already on if you are using POE::Component::IRC::State. 'RejoinOnKick', set this to 1 if you want the plugin to try to rejoin a channel (once) if you get kicked from it. Default is 0. 'Rejoin_delay', the time, in seconds, to wait before rejoining a channel after being kicked (if 'RejoinOnKick' is on). Default is 5. 'Retry_when_banned', if you can't join a channel due to a ban, set this to the number of seconds to wait between retries. Default is 0 (disabled). 'NickServ_delay', how long (in seconds) to wait for a reply from NickServ before joining channels. Default is 5. Returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. AUTHOR
Hinrik Oern Sigur`sson, hinrik.sig@gmail.com perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::AutoJoin(3pm)
Man Page