POE::C...dressed(3pm)
π POE::C...dressed(3pm) β User Contributed Perl Documentation π
okay bestie, gather round, because this is a 3pm manual page from the User Contributed Perl Documentation section and it's genuinely such a cute little plugin π. It's called POE::Component::IRC::Plugin::BotAddressed, and no cap, the whole job is just: hey, someone said your name in the channel π£
β¨ NAME β¨
POE::Component::IRC::Plugin::BotAddressed β a PoCo-IRC plugin that generates events when you are addressed π
πΈ SYNOPSIS πΈ
use POE::Component::IRC::Plugin::BotAddressed;
$irc->plugin_add( 'BotAddressed', POE::Component::IRC::Plugin::BotAddressed->new() );
sub irc_bot_addressed {
my ($kernel, $heap) = @_[KERNEL, HEAP];
my $nick = ( split /!/, $_[ARG0] )[0];
my $channel = $_[ARG1]->[0];
my $what = $_[ARG2];
print "$nick addressed me in channel $channel with the message '$what'\n";
}
sub irc_bot_mentioned {
my ($nick) = ( split /!/, $_[ARG0] )[0];
my ($channel) = $_[ARG1]->[0];
my ($what) = $_[ARG2];
print "$nick mentioned my name in channel $channel with the message '$what'\n";
}
π¦ DESCRIPTION π¦
POE::Component::IRC::Plugin::BotAddressed is a POE::Component::IRC plugin, and honestly? it's giving "the friend who taps you on the shoulder every time someone says your name" π«Ά
It keeps an eye on public channel traffic β that means irc_public and irc_ctcp_action β and when its own name comes up in the channel discussion, it fires off one of these events:
irc_bot_addressedirc_bot_mentionedirc_bot_mentioned_action
periodt. that's the whole vibe π
π METHODS π
π« new
One optional argument, bestie, just the one:
'eat'β set it to true and the plugin will eat theirc_public/irc_ctcp_actionevent and only generate an appropriate event instead. The default is false. π
Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add method. mwah π
π₯ OUTPUT EVENTS π₯
π irc_bot_addressed
Has the same parameters passed as irc_ctcp_public. ARG2 contains the message with the addressed nickname removed, ie. assuming that your bot is called LameBOT, and someone says 'LameBOT: dance for me', you will actually get 'dance for me'. iconic behaviour, honestly β
π irc_bot_mentioned
Has the same parameters passed as irc_public.
π irc_bot_mentioned_action
Has the same parameters passed as irc_ctcp_action.
π AUTHOR π
Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
ngl the whole module is like five lines of social awareness and yet it carries the entire room π
alright that's the page, bestie!! this absolute cutie was documented under perl v5.40.1, dated 2025-08-21, and it lives in the POE::C...dressed(3pm) manpage, slay π
β¨ no cap, go make your bot answer when it hears its own name π§π
π¦ 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