POE::C...dressed(3pm)

πŸ“¦
version 6.95 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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_addressed
  • irc_bot_mentioned
  • irc_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 the irc_public / irc_ctcp_action event 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