mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 03:49:29 +01:00
Use quietlist when setting mutes
This commit is contained in:
parent
b04c06f396
commit
1bb5fe031d
@ -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 ";
|
||||
|
||||
|
@ -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",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user