3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-17 09:29:30 +01:00

Core/IgnoreList: allow specifying nickname as channel argument to ignore private messages

This commit is contained in:
Pragmatic Software 2024-10-15 20:05:24 -07:00
parent 597820c053
commit 521e8850b0
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ sub add($self, $channel, $hostmask, $length, $owner) {
$hostmask .= '@*'; $hostmask .= '@*';
} }
$channel = '.*' if $channel !~ /^#/; $channel = '.*' if !defined $channel || $channel eq 'global';
my $regex = quotemeta $hostmask; my $regex = quotemeta $hostmask;
$regex =~ s/\\\*/.*?/g; $regex =~ s/\\\*/.*?/g;
@ -91,7 +91,7 @@ sub remove($self, $channel, $hostmask) {
$hostmask .= '@*'; $hostmask .= '@*';
} }
$channel = '.*' if $channel !~ /^#/; $channel = '.*' if !defined $channel || $channel eq 'global';
$self->{pbot}->{event_queue}->dequeue_event("ignore_timeout $channel $hostmask"); $self->{pbot}->{event_queue}->dequeue_event("ignore_timeout $channel $hostmask");
return $self->{storage}->remove($channel, $hostmask); return $self->{storage}->remove($channel, $hostmask);

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script # These are set by the /misc/update_version script
use constant { use constant {
BUILD_NAME => "PBot", BUILD_NAME => "PBot",
BUILD_REVISION => 4803, BUILD_REVISION => 4804,
BUILD_DATE => "2024-10-15", BUILD_DATE => "2024-10-15",
}; };