warn "couldn't do $file: $!" if $!;
warn "couldn't run $file" unless $return;
}else {
- print "Loading $class\n";
+ say "\nLoading $class";
$self->load_class($class);
}
my @subs = eval "$class->meta->get_method_list";
for my $c (@subs){
my $attr = eval "$class->meta->get_method('$c')->attributes";
- if ($attr){
- print "Command: $c";
+ if (@$attr){
+ print "Command: $c ";
my %c = (channels => ['all']);
my @aliases;
for (@{$attr}){
my ($self,$command,$channel) = @_;
$channel = lc $channel;
- return 0 unless exists $self->commands->{$command};
+ return 0 unless defined $command && exists $self->commands->{$command};
my $types = Set::Object->new(@{$self->commands->{$command}->type});
my @types = qw/pub/;
}
}
}
+ return 1;
}
1;