#!/usr/bin/perl

use strict;
use vars qw($VERSION %IRSSI $xmms);

use Irssi qw(command_bind signal_add);

$VERSION = '0.01';
%IRSSI = (
	author		=> 'Remco B. Brink',
	contact		=> 'remco@rc6.org',
	name		=> 'justfsckinggoogleit',
	descriotion	=> 'Suggest a user to Google before asking stupid questions',
	license		=> 'GPL',
);

sub justfsckinggoogleit {
	my ($url);
	my ($data, $server, $witem) = @_;
	
	$data =~ s/ /+/g;
	$url = "http://justfsckinggoogleit.com/search/$data";
	Irssi::active_win()->command("say $url");
}

Irssi::command_bind('google', 'justfsckinggoogleit');
