Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

poe::filter::ircd(3pm) [debian man page]

POE::Filter::IRCD(3pm)					User Contributed Perl Documentation				    POE::Filter::IRCD(3pm)

NAME
POE::Filter::IRCD - A POE-based parser for the IRC protocol. SYNOPSIS
use POE::Filter::IRCD; my $filter = POE::Filter::IRCD->new( debug => 1, colonify => 0 ); my $arrayref = $filter->get( [ $hashref ] ); my $arrayref2 = $filter->put( $arrayref ); use POE qw(Filter::Stackable Filter::Line Filter::IRCD); my ($filter) = POE::Filter::Stackable->new(); $filter->push( POE::Filter::Line->new( InputRegexp => '15?12', OutputLiteral => "1512" ), POE::Filter::IRCD->new(), ); DESCRIPTION
POE::Filter::IRCD provides a convenient way of parsing and creating IRC protocol lines. It provides the parsing engine for POE::Component::Server::IRC and POE::Component::IRC. A standalone version exists as Parse::IRC. CONSTRUCTOR
"new" Creates a new POE::Filter::IRCD object. Takes two optional arguments: 'debug', which will print all lines received to STDERR; 'colonify', set to 1 to force the filter to always colonify the last param passed in a put(), default is 0. See below for more detail. METHODS
"get_one_start" "get_one" "get_pending" "get" Takes an arrayref which is contains lines of IRC formatted input. Returns an arrayref of hashrefs which represents the lines. The hashref contains the following fields: prefix command params ( this is an arrayref ) raw_line For example, if the filter receives the following line, the following hashref is produced: LINE: ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot' HASHREF: { prefix => ':moo.server.net', command => '001', params => [ 'lamebot', 'Welcome to the IRC network lamebot' ], raw_line => ':moo.server.net 001 lamebot :Welcome to the IRC network lamebot', } "put" Takes an arrayref containing hashrefs of IRC data and returns an arrayref containing IRC formatted lines. Optionally, one can specify 'colonify' to override the global colonification option. eg. $hashref = { command => 'PRIVMSG', prefix => 'FooBar!foobar@foobar.com', params => [ '#foobar', 'boo!' ], colonify => 1, # Override the global colonify option for this record only. }; $filter->put( [ $hashref ] ); "clone" Makes a copy of the filter, and clears the copy's buffer. "debug" With a true or false argument, enables or disables debug output respectively. Without an argument the behaviour is to toggle the debug status. MAINTAINER
Chris Williams <chris@bingosnet.co.uk> AUTHOR
Jonathan Steinert LICENSE
Copyright X Chris Williams and Jonathan Steinert This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. SEE ALSO
POE POE::Filter POE::Filter::Stackable POE::Component::Server::IRC POE::Component::IRC Parse::IRC perl v5.10.1 2009-12-11 POE::Filter::IRCD(3pm)

Check Out this Related Man Page

POE::Component::IRC::Plugin::NickReclaim(3pm)		User Contributed Perl Documentation	     POE::Component::IRC::Plugin::NickReclaim(3pm)

NAME
POE::Component::IRC::Plugin::NickReclaim - A PoCo-IRC plugin for reclaiming your 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(); 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; } 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", 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. AUTHOR
Chris 'BinGOs' Williams With amendments applied by Zoffix Znet SEE ALSO
POE::Component::IRC perl v5.14.2 2011-12-07 POE::Component::IRC::Plugin::NickReclaim(3pm)
Man Page