default => sub{ {} },
);
-has targets => (
- is => 'ro',
- isa => 'HashRef[Str]',
- default => sub{ {} },
-);
my $DISP;
my ($self,$command,$channel) = @_;
$channel = lc $channel;
+ return 0 unless defined $command && defined $channel;
return 0 unless exists $self->commands->{$command};
return 0 unless exists $self->channels->{$channel};
return $self->channels->{$channel}->has($command->type);
}
-sub set_target {
- my ($self,$label,$target) = @_;
- $self->targets->{$label} = $target;
-}
-
sub run_command {
my ($self,$c,$command,$args) = @_;