Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
POE::Component::IRC::PUsernContributedOPe:Component::IRC::Plugin::POE::Knee(3)

NAME
       POE::Component::IRC::Plugin::POE::Knee -	A POE::Component::IRC plugin
       that runs Acme::POE::Knee races.

VERSION
       version 1.12

SYNOPSIS
	 use strict;
	 use warnings;
	 use POE qw(Component::IRC::State Component::IRC::Plugin::POE::Knee);

	 my $nickname =	'PoeKnee' . $$;
	 my $ircname = 'PoeKnee	the Sailor Bot';
	 my $ircserver = 'irc.blah.org';
	 my $port = 6667;
	 my $channel = '#IRC.pm';

	 my $irc = POE::Component::IRC::State->spawn(
	       nick => $nickname,
	       server => $ircserver,
	       port => $port,
	       ircname => $ircname,
	       debug =>	0,
	       plugin_debug => 1,
	       options => { trace => 0 },
	 ) or die "Oh noooo! $!";

	 POE::Session->create(
	       package_states => [
		       'main' => [ qw(_start irc_001 irc_poeknee_results) ],
	       ],
	 );

	 $poe_kernel->run();
	 exit 0;

	 sub _start {
	   # Create and	load our CTCP plugin
	   $irc->plugin_add( 'PoeKnee' =>
	       POE::Component::IRC::Plugin::POE::Knee->new( stages => 8	) );

	   $irc->yield(	register => 'all' );
	   $irc->yield(	connect	=> { } );
	   undef;
	 }

	 sub irc_001 {
	   $irc->yield(	join =>	$channel );
	   undef;
	 }

	 sub irc_poeknee_results {
	   my ($channel,$results) = @_[ARG0,ARG1];
	   print "$channel\n";
	   print "$_\n"	for @{ $results	};
	   undef;
	 }

DESCRIPTION
       POE::Component::IRC::Plugin::POE::Knee, is a POE::Component::IRC	plugin
       that runs Acme::POE::Knee style horse races on IRC channels using the
       channel member list to generate the POE::Knees. >:)

CONSTRUCTOR
       "new"
	   Creates a new plugin	object.	You may	specify	the following optional
	   parameters:

	     'stages' => the number of stages involved in the race, default is 5;

IRC INPUT
       "POEKNEE"
	   If your bot is addressed by name with the command 'POEKNEE' (case
	   doesn't matter), with optional number of stages, a POE::Knee	race
	   is started.

	     GumbyBRAIN: POEKNEE 10

OUTPUT
       Apart from the output seen on the IRC channel where a POE::Knee race is
       currently underway, at the end of a race	the following 'irc' event is
       generated.

       "irc_poeknee_results"
	   Generated each time a POE::Knee race	finishes.

	     ARG0, the channel where the race was run;
	     ARG1, an arrayref containing lots of potentially uninteresting data;

SEE ALSO
       POE::Component::IRC

       Acme::POE::Knee

AUTHORS
       o   Chris Williams

       o   Jos Boumans

       o   Rocco Caputo

COPYRIGHT AND LICENSE
       This software is	copyright (c) 2017 by Chris Williams, Jos Boumans and
       Rocco Caputo.

       This is free software; you can redistribute it and/or modify it under
       the same	terms as the Perl 5 programming	language system	itself.

perl v5.32.1			  201POE::Component::IRC::Plugin::POE::Knee(3)

NAME | VERSION | SYNOPSIS | DESCRIPTION | CONSTRUCTOR | IRC INPUT | OUTPUT | SEE ALSO | AUTHORS | COPYRIGHT AND LICENSE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=POE::Component::IRC::Plugin::POE::Knee&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help