From bf8749ff9e27adecb4d924fd520afa88d277832f Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 9 Mar 2022 12:56:38 -0800 Subject: [PATCH] Fix `blacklist` command --- lib/PBot/Core/Commands/BlackList.pm | 5 +++-- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/PBot/Core/Commands/BlackList.pm b/lib/PBot/Core/Commands/BlackList.pm index 663e76c7..a21e9731 100644 --- a/lib/PBot/Core/Commands/BlackList.pm +++ b/lib/PBot/Core/Commands/BlackList.pm @@ -36,6 +36,7 @@ sub cmd_blacklist { given ($command) { when ($_ eq "list" or $_ eq "show") { + my $blacklist = $self->{pbot}->{blacklist}->{storage}; my $text = "Blacklist:\n"; my $entries = 0; @@ -66,7 +67,7 @@ sub cmd_blacklist { $channel = '.*' if not defined $channel; $self->{pbot}->{logger}->log("$context->{hostmask} added [$mask] to blacklist for channel [$channel]\n"); - $self->add($channel, $mask); + $self->{pbot}->{blacklist}->add($channel, $mask); return "/say $mask blacklisted in channel $channel"; } @@ -83,7 +84,7 @@ sub cmd_blacklist { return "/say $mask not found in blacklist for channel $channel (use `blacklist list` to display blacklist)"; } - $self->remove($channel, $mask); + $self->{pbot}->{blacklist}->remove($channel, $mask); $self->{pbot}->{logger}->log("$context->{hostmask} removed $mask from blacklist for channel $channel\n"); return "/say $mask removed from blacklist for channel $channel"; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 866f0403..4b5e9447 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 => 4505, - BUILD_DATE => "2022-02-27", + BUILD_REVISION => 4511, + BUILD_DATE => "2022-03-09", }; sub initialize {}