mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
Add is_active($channel) to determine if $channel is added and enabled
This commit is contained in:
parent
2792a0cb0b
commit
bdfd17612c
@ -101,6 +101,18 @@ sub list {
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub is_active {
|
||||
my ($self, $channel) = @_;
|
||||
|
||||
return exists $self->{channels}->hash->{$channel} && $self->{channels}->hash->{$channel}->{enabled};
|
||||
}
|
||||
|
||||
sub is_active_op {
|
||||
my ($self, $channel) = @_;
|
||||
|
||||
return $self->is_active($channel) && $self->{channels}->hash->{$channel}->{chanop};
|
||||
}
|
||||
|
||||
sub load_channels {
|
||||
my $self = shift;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user