Anonymous
public text v1 · immutablepackage boobs::Module::google;
use strict;
use warnings;
no warnings 'redefine';
use net::google;
sub new {
return bless {}, shift;
}
sub handle_privmsg {
my ($self, $event) = @_;
my $msg = $event->msg;
if ( $msg =~ /^\.google (.+)/i) {
$event->respond("PRIVMSG", google $1);
} elsif ( $msg =~ /^\.(?:gis|googleimagesearch|googleimages?) (.+)/i) {
$event->respond("PRIVMSG", googleimagesearch $1);
}
}
1;