Man Page: poe::component::irc::plugin::nickreclaim
Operating Environment: debian
Section: 3pm
POE::Component::IRC::Plugin::NickReclaim(3pm) User Contributed Perl Documentation POE::Component::IRC::Plugin::NickReclaim(3pm)NAMEPOE::Component::IRC::Plugin::NickReclaim - A PoCo-IRC plugin for reclaiming your nicknameSYNOPSISuse 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; }DESCRIPTIONPOE::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", appendedwith an underscore, and then poll to try and change it to the original nickname. If someone in your channel who has the nickname you're after quits or changes nickname, the plugin will try to reclaim it immediately.METHODS"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.AUTHORChris 'BinGOs' Williams With amendments applied by Zoffix ZnetSEE ALSOPOE::Component::IRC perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::NickReclaim(3pm)
| Similar Topics in the Unix Linux Community |
|---|
| IRC and Root |
| Where is Mozilla IRC Client on SuSE? |
| Night Light IRC Proxy 1.3.2b (Default branch) |
| ctrlproxy 3.0.7 (Default branch) |
| Using ii for irc chat - scripting assistance? |