package Whois;
require Exporter;
use strict;
use warnings;
our @ISA    = qw(Exporter);

use utf8;

use lib "../modules";
use Plugins;
use Configs;
sub getWhois {
	my $bot = shift;
	my $user =shift;
	my $domain = shift;
	if(not defined $domain){
		return "Keine Domain angegeben";
	}

	$domain =~ s/[^a-zA-Z0-9\._\-]//g;

    my $output = `whois $domain`;

	# remove paragraph (because its the disclaimer)
	$output =~ s/^.*?\n\s*\n//s;

	return "Ausgabe von 'whois $domain':\n\n".$output;
}

Plugins::registerPlugin("whois",\&getWhois,"Macht eine whois Abfrage der angegebenen Domain\nBeispiel:\nwhois zinformatik.de","Whoisabfrage");

