Security Advisories (1)
CVE-2010-3438 (2019-11-12)

libpoe-component-irc-perl before v6.32 does not remove carriage returns and line feeds. This can be used to execute arbitrary IRC commands by passing an argument such as \"some text\\rQUIT\" to the 'privmsg' handler, which would cause the client to disconnect from the server.

NAME

POE::Component::IRC::Plugin::NickReclaim - a plugin for reclaiming nickname.

SYNOPSIS

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();
exit 0;

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 => { } );
  undef;
}

DESCRIPTION

POE::Component::IRC::Plugin::NickReclaim - A POE::Component::IRC plugin automagically deals with your bot's nickname being in use and reclaims it when it becomes available again.

It registers and handles 'irc_433' events. On receiving a 433 event it will reset the nickname to the 'nick' specified with spawn() or connect(), appended with an underscore, and then poll to try and change it to the original nickname.

CONSTRUCTOR

new

Takes one optional argument:

'poll', the number of seconds between nick change attempts, default is 30;

Returns a plugin object suitable for feeding to POE::Component::IRC's plugin_add() method.

AUTHOR

Chris 'BinGOs' Williams

SEE ALSO

POE::Component::IRC