3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 03:02:47 +01:00

Use quietlist when setting mutes

This commit is contained in:
Pragmatic Software 2023-05-04 16:30:35 -07:00
parent b04c06f396
commit 1bb5fe031d
2 changed files with 5 additions and 3 deletions

View File

@ -582,10 +582,12 @@ sub do_ban_or_mute($self, $context, $mode) {
my $immediately = @targets > 1 ? 0 : 1;
my $duration;
my $list = $mode eq 'ban' ? 'banlist' : 'quietlist';
foreach my $t (@targets) {
my $mask = lc $self->{pbot}->{banlist}->nick_to_banmask($t);
my $ban = $self->{pbot}->{banlist}->{banlist}->get_data($channel, $mask);
my $ban = $self->{pbot}->{banlist}->{$list}->get_data($channel, $mask);
if (defined $ban) {
my $save = 0;
@ -600,7 +602,7 @@ sub do_ban_or_mute($self, $context, $mode) {
$save = 1;
}
$self->{pbot}->{banlist}->{banlist}->save if $save;
$self->{pbot}->{banlist}->{$list}->save if $save;
$result .= "$sep$mask ";

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4656,
BUILD_REVISION => 4657,
BUILD_DATE => "2023-05-04",
};