POE::C...n::CTCP(3pm)
π NAME π
POE::Component::IRC::Plugin::CTCP β a PoCo-IRC plugin that auto-responds to CTCP requests π«Ά
Like, bestie, this is the little plugin that answers the door when someone knocks with a CTCP, so you don't have to π
β¨ 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:
}
No cap, that's the whole starter pack π
πΈ DESCRIPTION πΈ
POE::Component::IRC::Plugin::CTCP is a POE::Component::IRC plugin. It just kinda... sits there, watching for irc_ctcp_version, irc_ctcp_userinfo, irc_ctcp_ping, irc_ctcp_time and irc_ctcp_source events, and then autoresponds on your behalf. It's giving personal assistant energy, fr fr π
π¦ METHODS π¦
π new π
Takes a number of optional arguments, and yeah they're all optional, so breathe:
'version'β a string to send in response toirc_ctcp_version. Default is PoCo-IRC and version π«'clientinfo'β a string to send in response toirc_ctcp_clientinfo. Default is <http://search.cpan.org/perldoc?POE::Component::IRC::Plugin::CTCP>.'userinfo'β a string to send in response toirc_ctcp_userinfo. Default is'm33p'πΌ (yes really, iconic behaviour honestly)'source'β a string to send in response toirc_ctcp_source. Default is <http://search.cpan.org/dist/POE-Component-IRC>.'eat'β by default the plugin usesPCI_EAT_CLIENT; set this to0to disable this behaviour π
Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add method. Feed it well π
π
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.
Lowkey note: it's a vibe check on whether the plugin is out here consuming the CTCP events it handled. Give it a true-ish value and it starts snacking; give it a false-ish one and it stops πͺ
π AUTHOR π
Chris 'BinGOs' Williams β¨ absolute legend, we stan π«Ά
π SEE ALSO π
CTCP Specification <http://www.irchelp.org/irchelp/rfc/ctcpspec.html>.
And that's the whole page, bestie! π This one's from your girl perl v5.40.1, dated 2025-08-21 β go drink some water and go answer those CTCPs π β¨
π¦ where this page comes from
- ubuntu resolute: libpoe-component-irc-perl 6.95+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-component-irc-perl 6.95+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms