From c979efcfa65e154bce23144c5cb845dc23b64588 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 28 Oct 2014 20:34:48 +0000 Subject: [PATCH] Ignore add_op_command() for channels bot is not registered or set as op --- PBot/ChanOps.pm | 1 + PBot/VERSION.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/PBot/ChanOps.pm b/PBot/ChanOps.pm index d7ee08f8..8092df49 100644 --- a/PBot/ChanOps.pm +++ b/PBot/ChanOps.pm @@ -70,6 +70,7 @@ sub lose_ops { sub add_op_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; } diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 9a1adbe5..6682d51c 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 795, + BUILD_REVISION => 796, BUILD_DATE => "2014-10-28", };