| 1 | package POE::Component::IRC::Plugin::CoinFlip; | ||
| 2 | |||
| 3 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | our $VERSION = '1.001003'; # VERSION | |
| 7 | |||
| 8 | 1 | ▶ | use POE; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use base 'POE::Component::IRC::Plugin::BaseWrap'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 0 | ▶ | sub _make_default_args { |
|
Subroutine
_make_default_args: not called CC=1 SCAR=6.9
| |||
| 12 | return ( | ||
| 13 | 0 | trigger => qr/^(?=flip$)/i, | |
| 14 | response_event => 'irc_coin_flip', | ||
| 15 | ); | ||
| 16 | } | ||
| 17 | |||
| 18 | 0 | ▶ | sub _make_response_message { |
|
Subroutine
_make_response_message: not called CC=1 SCAR=6.9
| |||
| 19 | 0 | my ( $self, $in_ref ) = @_; | |
| 20 | 0 | my $nick = (split /!/, $in_ref->{who})[0]; | |
| 21 | 0 | return "$nick, " . qw/heads tails/[rand 2]; | |
| 22 | } | ||
| 23 | |||
| 24 | 0 | ▶ | sub _message_into_response_event { 'flip' } |
|
Subroutine
_message_into_response_event: not called CC=1 SCAR=6.9
| |||
| 25 | |||
| 26 | 1 | 1; | |
| 27 | __END__ | ||