mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
Ignore add_op_command() for channels bot is not registered or set as op
This commit is contained in:
parent
f640ade74e
commit
c979efcfa6
@ -70,6 +70,7 @@ sub lose_ops {
|
|||||||
|
|
||||||
sub add_op_command {
|
sub add_op_command {
|
||||||
my ($self, $channel, $command) = @_;
|
my ($self, $channel, $command) = @_;
|
||||||
|
return if not exists $self->{pbot}->{channels}->{channels}->hash->{$channel} or not $self->{pbot}->{channels}->{channels}->hash->{$channel}{chanop};
|
||||||
push @{ $self->{op_commands}->{$channel} }, $command;
|
push @{ $self->{op_commands}->{$channel} }, $command;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 795,
|
BUILD_REVISION => 796,
|
||||||
BUILD_DATE => "2014-10-28",
|
BUILD_DATE => "2014-10-28",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user