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
POE::Component::IRC::Plugin::POE::Knee(3) User Contributed Perl Documentation POE::Component::IRC::Plugin::POE::Knee(3)

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

version 1.12

  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;
  }

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. >:)

"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;
    

"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
    

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;
    

POE::Component::IRC

Acme::POE::Knee

  • Chris Williams
  • Jos Boumans
  • Rocco Caputo

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.

2017-02-26 perl v5.32.1

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

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