mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-29 07:19:23 +01:00
Fix blacklist
command
This commit is contained in:
parent
46ccc1fb70
commit
bf8749ff9e
@ -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";
|
||||
}
|
||||
|
@ -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 {}
|
||||
|
Loading…
Reference in New Issue
Block a user