mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 20:09:43 +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 $immediately = @targets > 1 ? 0 : 1;
|
||||||
my $duration;
|
my $duration;
|
||||||
|
|
||||||
|
my $list = $mode eq 'ban' ? 'banlist' : 'quietlist';
|
||||||
|
|
||||||
foreach my $t (@targets) {
|
foreach my $t (@targets) {
|
||||||
my $mask = lc $self->{pbot}->{banlist}->nick_to_banmask($t);
|
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) {
|
if (defined $ban) {
|
||||||
my $save = 0;
|
my $save = 0;
|
||||||
@ -600,7 +602,7 @@ sub do_ban_or_mute($self, $context, $mode) {
|
|||||||
$save = 1;
|
$save = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{pbot}->{banlist}->{banlist}->save if $save;
|
$self->{pbot}->{banlist}->{$list}->save if $save;
|
||||||
|
|
||||||
$result .= "$sep$mask ";
|
$result .= "$sep$mask ";
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ 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 => 4656,
|
BUILD_REVISION => 4657,
|
||||||
BUILD_DATE => "2023-05-04",
|
BUILD_DATE => "2023-05-04",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user