diff --git a/PBot/BanTracker.pm b/PBot/BanTracker.pm index 8ef78b99..e0d2fb18 100644 --- a/PBot/BanTracker.pm +++ b/PBot/BanTracker.pm @@ -35,6 +35,7 @@ sub initialize { $self->{banlist} = {}; $self->{pbot}->{registry}->add_default('text', 'bantracker', 'chanserv_ban_timeout', '604800'); + $self->{pbot}->{registry}->add_default('text', 'bantracker', 'debug', '0'); $self->{pbot}->{commands}->register(sub { $self->dumpbans(@_) }, "dumpbans", 60); @@ -97,7 +98,9 @@ sub get_baninfo { $account = undef if $account eq '-1'; $account = lc $account if defined $account; - $self->{pbot}->{logger}->log("[get-baninfo] Getting baninfo for $mask in $channel using account " . (defined $account ? $account : "[undefined]") . "\n"); + if ($self->{pbot}->{registry}->get_value('bantracker', 'debug')) { + $self->{pbot}->{logger}->log("[get-baninfo] Getting baninfo for $mask in $channel using account " . (defined $account ? $account : "[undefined]") . "\n"); + } foreach my $mode (keys %{ $self->{banlist}{$channel} }) { foreach my $banmask (keys %{ $self->{banlist}{$channel}{$mode} }) { diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 2fd39531..3fbd1159 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 => 804, + BUILD_REVISION => 805, BUILD_DATE => "2014-12-26", };