3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-01 16:39:27 +01:00

Fix blacklist command

This commit is contained in:
Pragmatic Software 2022-03-09 12:56:38 -08:00
parent 46ccc1fb70
commit bf8749ff9e
2 changed files with 5 additions and 4 deletions

View File

@ -36,6 +36,7 @@ sub cmd_blacklist {
given ($command) { given ($command) {
when ($_ eq "list" or $_ eq "show") { when ($_ eq "list" or $_ eq "show") {
my $blacklist = $self->{pbot}->{blacklist}->{storage};
my $text = "Blacklist:\n"; my $text = "Blacklist:\n";
my $entries = 0; my $entries = 0;
@ -66,7 +67,7 @@ sub cmd_blacklist {
$channel = '.*' if not defined $channel; $channel = '.*' if not defined $channel;
$self->{pbot}->{logger}->log("$context->{hostmask} added [$mask] to blacklist for channel [$channel]\n"); $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"; 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)"; 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"); $self->{pbot}->{logger}->log("$context->{hostmask} removed $mask from blacklist for channel $channel\n");
return "/say $mask removed from blacklist for channel $channel"; return "/say $mask removed from blacklist for channel $channel";
} }

View File

@ -25,8 +25,8 @@ 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 => 4505, BUILD_REVISION => 4511,
BUILD_DATE => "2022-02-27", BUILD_DATE => "2022-03-09",
}; };
sub initialize {} sub initialize {}