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

Core/BanList: correct ban_user() arguments

This commit is contained in:
Pragmatic Software 2023-04-28 00:46:22 -07:00
parent 2c3f8fb9fe
commit 8555e8f00e
2 changed files with 7 additions and 7 deletions

View File

@ -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");

View File

@ -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 {}