From 8555e8f00ec4f480c910b57d6405d5d3b9b7db76 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 28 Apr 2023 00:46:22 -0700 Subject: [PATCH] Core/BanList: correct ban_user() arguments --- lib/PBot/Core/BanList.pm | 10 +++++----- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/PBot/Core/BanList.pm b/lib/PBot/Core/BanList.pm index 6ac2227c..3cd4018e 100644 --- a/lib/PBot/Core/BanList.pm +++ b/lib/PBot/Core/BanList.pm @@ -142,7 +142,7 @@ sub has_ban_timeout($self, $channel, $mask, $mode = 'b') { } } -sub ban_user_timed($self, $channel, $mode, $mask, $length, $owner, $reason, $immediately = 0) { +sub ban_user_timed($self, $channel, $mode, $mask, $length, $owner, $reason, $immediately = undef) { $channel = lc $channel; $mask = lc $mask; @@ -172,22 +172,22 @@ sub ban_user_timed($self, $channel, $mode, $mask, $length, $owner, $reason, $imm } } -sub ban_user($self, $channel, $mode, $mask, $immediately = 0) { +sub ban_user($self, $channel, $mode, $mask, $immediately = undef) { $self->{pbot}->{logger}->log("Banning $channel +$mode $mask\n"); $self->add_to_ban_queue($channel, $mode, $mask); - if ($immediately) { + if (not defined $immediately or $immediately != 0) { $self->flush_ban_queue; } } -sub unban_user($self, $channel, $mode, $mask, $immediately = 0) { +sub unban_user($self, $channel, $mode, $mask, $immediately = undef) { $mask = lc $mask; $channel = lc $channel; $self->{pbot}->{logger}->log("Unbanning $channel -$mode $mask\n"); $self->unmode_user($channel, $mode, $mask, $immediately); } -sub unmode_user($self, $channel, $mode, $mask, $immediately = 0) { +sub unmode_user($self, $channel, $mode, $mask, $immediately = undef) { $mask = lc $mask; $channel = lc $channel; $self->{pbot}->{logger}->log("Removing mode $mode from $mask in $channel\n"); diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index f648c4f7..74b03b2a 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4652, - BUILD_DATE => "2023-04-21", + BUILD_REVISION => 4653, + BUILD_DATE => "2023-04-28", }; sub initialize {}