| 1 | package Bot::BasicBot::Pluggable::Module::Zippy; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use Bot::BasicBot::Pluggable::Module; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use base qw(Bot::BasicBot::Pluggable::Module); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 1 | my @yows; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 0 | ▶ | sub said { | ||||||||||||||||||||||||||
|
Subroutine
said: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||
| 10 | 0 | my ($self, $mess, $pri) = @_; | |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 0 | my $body = $mess->{body}; | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 0 | ▶ | return unless $body =~ /^yow[!? ]*$/i or $body =~ /^be zippy\?*$/i; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$body =~ /^yow[!? ]*$/i or $body =~ /^be zippy\?*$/i
MC/DC0%0/2
$body =~ /^yow[!? ]*$/i or $body =~ /^be zippy\?*$/i
$body =~ /^yow[!? ]*$/i
$body =~ /^be zippy\?*$/i
Truth table0%0/3
A or B
A= $body =~ /^yow[!? ]*$/iB= $body =~ /^be zippy\?*$/i
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | return unless ($pri == 2); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 0 | ▶ | unless (@yows) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 19 | 0 | ▶ | while (<DATA>) { chomp; next if /^\s*$/; push @yows, $_; } | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | return $yows[rand(@yows)]; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 0 | ▶ | sub help { | ||||||||||||||||||||||||||
|
Subroutine
help: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 26 | 0 | return "Commands: 'yow' or 'be zippy'"; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 1 | 1; | |||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | =head1 NAME | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | Bot::BasicBot::Pluggable::Module::Zippy - module for Zippy the Pinhead quotes | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | It's OBVIOUS ... The FURS never reached ISTANBUL ... You were an EXTRA | ||||||||||||||||||||||||||||
| 38 | in the REMAKE of "TOPKAPI" ... Go home to your WIFE ... She's making | ||||||||||||||||||||||||||||
| 39 | FRENCH TOAST! | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | =head1 IRC USAGE | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | [yow|be zippy] | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | Simon Wistow, <simon@thegestalt.org> | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | based on code by Rich Lafferty (mendel) <rich@vax2.concordia.ca> | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | and data from fortune-mod-9708 | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | Copyright 2005, Simon Wistow | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | Distributed under the same terms as Perl itself. | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | L<Math::Units> | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | =cut | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | __DATA__ | ||||||||||||||||||||||||||||