From 521e8850b062be85ecf552b94d4bb7f6ad2a773e Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 15 Oct 2024 20:05:24 -0700 Subject: [PATCH] Core/IgnoreList: allow specifying nickname as channel argument to ignore private messages --- lib/PBot/Core/IgnoreList.pm | 4 ++-- lib/PBot/VERSION.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PBot/Core/IgnoreList.pm b/lib/PBot/Core/IgnoreList.pm index e0170a64..646c85c8 100644 --- a/lib/PBot/Core/IgnoreList.pm +++ b/lib/PBot/Core/IgnoreList.pm @@ -51,7 +51,7 @@ sub add($self, $channel, $hostmask, $length, $owner) { $hostmask .= '@*'; } - $channel = '.*' if $channel !~ /^#/; + $channel = '.*' if !defined $channel || $channel eq 'global'; my $regex = quotemeta $hostmask; $regex =~ s/\\\*/.*?/g; @@ -91,7 +91,7 @@ sub remove($self, $channel, $hostmask) { $hostmask .= '@*'; } - $channel = '.*' if $channel !~ /^#/; + $channel = '.*' if !defined $channel || $channel eq 'global'; $self->{pbot}->{event_queue}->dequeue_event("ignore_timeout $channel $hostmask"); return $self->{storage}->remove($channel, $hostmask); diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 7c27e55e..55ec8b88 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,7 +25,7 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4803, + BUILD_REVISION => 4804, BUILD_DATE => "2024-10-15", };