From 1bb5fe031d261179ba8cc295f6c1f2e54aab5058 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 4 May 2023 16:30:35 -0700 Subject: [PATCH] Use quietlist when setting mutes --- lib/PBot/Core/Commands/ChanOp.pm | 6 ++++-- lib/PBot/VERSION.pm | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/PBot/Core/Commands/ChanOp.pm b/lib/PBot/Core/Commands/ChanOp.pm index d37f969b..aac54939 100644 --- a/lib/PBot/Core/Commands/ChanOp.pm +++ b/lib/PBot/Core/Commands/ChanOp.pm @@ -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 "; diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 79ba2841..10d98f50 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -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", };