From 21d06bc14988881984f9af925252a0d7c9a06b3d Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 13 Feb 2023 16:06:24 -0800 Subject: [PATCH] IRC: do not debug PONG events --- lib/PBot/Core/IRC/Connection.pm | 14 +++++++++----- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/PBot/Core/IRC/Connection.pm b/lib/PBot/Core/IRC/Connection.pm index 2f67ad42..3966e127 100644 --- a/lib/PBot/Core/IRC/Connection.pm +++ b/lib/PBot/Core/IRC/Connection.pm @@ -508,11 +508,13 @@ sub handler { croak "Not enough arguments to handler()"; } - print STDERR "--- Trying to handle event '$ev'.\n" if $self->{_debug}; + unless ($ev eq 'pong') { + print STDERR "--- Trying to handle event '$ev'.\n" if $self->{_debug}; - if ($self->{_debug} > 1) { - use Data::Dumper; - print STDERR "ev: ", Dumper($ev), "\nevent: ", Dumper($event), "\n"; + if ($self->{_debug} > 1) { + use Data::Dumper; + print STDERR "ev: ", Dumper($ev), "\nevent: ", Dumper($event), "\n"; + } } my $handler = undef; @@ -535,7 +537,9 @@ sub handler { confess "Bad parameter passed to handler(): rp=$rp"; } - print STDERR "--- Handler for '$ev' called.\n" if $self->{_debug}; + unless ($ev eq 'pong') { + print STDERR "--- Handler for '$ev' called.\n" if $self->{_debug}; + } return 1; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index b73e7851..30e59966 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4618, - BUILD_DATE => "2023-02-09", + BUILD_REVISION => 4619, + BUILD_DATE => "2023-02-13", }; sub initialize {}