Amethyst

 view release on metacpan or  search on metacpan

Amethyst/Brain/Infobot/Module/Zappa.pm  view on Meta::CPAN

package Amethyst::Brain::Infobot::Module::Zappa;

use strict;
use vars qw(@ISA);
use Amethyst::Message;
use Amethyst::Brain::Infobot;
use Amethyst::Brain::Infobot::Module;

@ISA = qw(Amethyst::Brain::Infobot::Module);

sub new {
	my $class = shift;
	my $self = $class->SUPER::new(
					Name		=> 'Zappa',
					Regex		=> qr/^(be zappa)$/i,
					Usage		=> 'be zappa',
					Description	=> "gives you a random quote from " .
									"Frank Zappa",
					@_
						);

	return bless $self, $class;
}

sub action {
    my ($self, $message) = @_;

	my $reply = $self->reply_to($message, $self->quote());
	$reply->send;

	return 1;
}

sub quote { 
	my $self = shift;

	unless ($self->{quotes}) {
		while (<DATA>) {
			chomp;
			push @{$self->{quotes}}, $_; 
		}
	}

	my $y = $self->{quotes}->[rand(@{$self->{quotes}})];

	return $y;
}

1;

__DATA__
Don't eat yellow snow!
Remember there's a big difference between kneeling down and bending over.
You have just destroyed one model XQJ-37 nuclear powered pansexual roto-plooker....and you're gonna have to pay for it.
He was in a quandary...being devoured by the swirling cesspool of his own steaming desires... uh.. the guy was a wreck
All people have the right to be stupid, some people just abuse it!
And now....you are going to dance...like you've never danced before!
Bring the band on down behind me, boys.
Not a speck of cereal.
Nothing but the best for my dog.
You drank beer, you played golf, you watched football - WE EVOLVED!
It looks just like a Telefunken U-47!
Don't mind your make-up, you'd better make your mind up.
They're serving burgers in the back!
Jazz is not dead...it just smells funny. -- Beebop tango introduction
I have a message to deliver to the cute people of the world...if you're cute, or maybe you're beautiful...there's MORE OF US UGLY MOTHERFUCKERS OUT THERE THAN YOU ARE!! So watch out.
Is that a real poncho or a Sears poncho?
You're an asshole! You're an asshole! That's right! You're an asshole! You're an asshole! Yes yes!
Number one ain't you... You ain't even number two.
Who are the brain police?
A prune isn't really a vegetable... CABBAGE is a vegetable...
Here's one for mother
Only thirteen, and she knows how to NASTY



( run in 0.897 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )