GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  POE::COMPONENT::IRC::PLUGIN::POE::KNEE (3)

.ds Aq ’

NAME

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

CONTENTS

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;



AUTHOR

Chris ’BinGOs’ Williams

Based on Acme::POE::Knee by Jos Boumans and Rocco Caputo

LICENSE

Copyright X Chris Williams, Jos Boumans and Rocco Caputo.

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

SEE ALSO

POE::Component::IRC

Acme::POE::Knee

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 POE::COMPONENT::IRC::PLUGIN::POE::KNEE (3) 2009-04-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.