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

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

πŸ’– POE::Component::IRC::Plugin::NickReclaim πŸ’–

okay bestie, so this is POE::Component::IRC::Plugin::NickReclaim β€” a PoCo-IRC plugin for reclaiming your nickname, and honestly? it's giving main character energy, because it's literally about getting YOUR name back. periodt. πŸ‘‘

it's a chunk of the User Contributed Perl Documentation, and the whole vibe is "your bot deserves its own name, and it's gonna fight for it." no cap.


✨ NAME ✨

POE::Component::IRC::Plugin::NickReclaim β€” A PoCo-IRC plugin for reclaiming your nickname πŸ’…

like. the name says it all. it reclaims. iconic.


🌸 SYNOPSIS 🌸

here's the whole look, copied character for character because we do not mess with code in this house:

use strict;
use warnings;
use POE qw(Component::IRC Component::IRC::Plugin::NickReclaim);

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 {
    $irc->yield( register => 'all' );

    # Create and load our NickReclaim plugin, before we connect
    $irc->plugin_add( 'NickReclaim' =>
        POE::Component::IRC::Plugin::NickReclaim->new( poll => 30 ) );

    $irc->yield( connect => { } );
    return;
}

see how we load the plugin before we connect? yeah. do that. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

POE::Component::IRC::Plugin::NickReclaim β€” a POE::Component::IRC plugin that automagically deals with your bot's nickname being in use, and then reclaims it once it becomes available again. it is literally so considerate.

the way it works: it registers and handles irc_433 events. so when a 433 event comes in, it resets the nickname to the nick you specified with "spawn" or "connect" β€” appended with an underscore β€” and then it starts polling to try and change it back to the original nickname you wanted. determined queen behavior. πŸ’…

and here's the bestie part: if someone in your channel who has the nickname you're after quits or changes nickname, the plugin will try to reclaim it immediately. no waiting around. slay. πŸ”₯


πŸ’œ METHODS πŸ’œ

🌟 "new"

takes one optional argument, okay? just the one:

  • 'poll' β€” the number of seconds between nick change attempts. default is 30. so yeah, every thirty seconds it's like "hey… is my name free yet… πŸ₯Ί" and honestly, same.

returns a plugin object suitable for feeding to POE::Component::IRC's "plugin_add" method. it's ready to be loved and loaded. πŸŽ€


πŸ‘‘ AUTHOR πŸ‘‘

Chris 'BinGOs' Williams

With amendments applied by Zoffix Znet

(legends, both of them, fr fr 🌈)


πŸŽ€ SEE ALSO πŸŽ€

  • POE::Component::IRC

lowkey reminder bestie: the polls only kick in after that irc_433 hits, so register your stuff and let the plugin do its thing. iykyk. ✨

and that's the whole page!! this came from the User Contributed Perl Documentation, perl v5.40.1, dated 2025-08-21, and it lives under the manual name POE::C...eclaim (3pm) πŸ’– go get your nickname back, you absolute icon. mwah πŸ¦‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from