All pastes #25652 Raw Edit

Anonymous

public text v1 · immutable
#25652 ·published 2005-10-16 04:55 UTC
rendered paste body
package 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;