POE::C...utoJoin(3pm)
π NAME π
POE::Component::IRC::Plugin::AutoJoin β a PoCo-IRC plugin that literally keeps you on your favorite channels π
(and yes bestie, this whole page is from the POE::C...utoJoin(3pm) manual, we're in perl-doc land π«Ά)
πΈ SYNOPSIS πΈ
Copied exactly, char for char, no notes:
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 β¨
So. POE::Component::IRC::Plugin::AutoJoin is a POE::Component::IRC plugin π and its whole personality is: you will not be left hanging in an empty channel.
If you get disconnected, the plugin will join all the channels you were on the next time it gets connected to the IRC server. Iconic behavior honestly π
It can also rejoin a channel if the IRC component gets kicked from it. And the way it keeps track of channel keys?? Obsessed β so it will be able to rejoin keyed channels in case of reconnects/kicks π
Now. 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. Patient queen behavior π
β οΈ One requirement bestie, no skipping: this plugin requires the IRC component to be POE::Component::IRC::State or a subclass thereof. Not optional. It's giving "must be at least this tall to ride" π
π 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 usingPOE::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. So by default it justβ¦ watches you get kicked π'Rejoin_delay'β the time, in seconds, to wait before rejoining a channel after being kicked (if'RejoinOnKick'is on). Default is 5. A little dramatic pause before the comeback β¨'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). F in the chat for the ban π'NickServ_delay'β how long (in seconds) to wait for a reply from NickServ before joining channels. Default is 5. Giving NickServ her moment π«Ά
Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add method. That's the whole point fr fr π
π AUTHOR π
Hinrik Γrn SigurΓ°sson, hinrik.sig@gmail.com β thank you for your service bestie πβ
okay that's the whole page, nothing skipped, nothing invented π§ this one's perl v5.40.1, dated 2025-08-21, straight from the POE::C...utoJoin(3pm) manual π slay, go rejoin your channels π
π¦ 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