use 5.006;
####
sub new {
my $package = shift;
my %attributes = %{ shift() };
my ($bot_name, $prefix, $server, $password, $port, $channel);
$bot_name = $attributes{name};
$prefix = $attributes{prefix};
$server = $attributes{server};
$password = $attributes{password};
$port = $attributes{port};
$channel = $attributes{channel};
for ($bot_name, $prefix, $server, $password, $port, $channel) {
die "Incomplete attribute list" unless $_;
}
convertAttributes( \%attributes )
or die "Attribute list malformatted";
bless { %botInfo }, $package;
}
####
for (qw/ name prefix server password port channel /) {
$attributes{$_} or die "Missing attribute '$_'";
}