my @subs = eval "$class->meta->get_method_list";
for my $c (@subs){
my $attr = eval "$class->meta->get_method('$c')->attributes";
- if ($attr){
+ if (@$attr){
print "Command: $c";
my %c = (channels => ['all']);
my @aliases;
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;