mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
Core/BanList: correct ban_user() arguments
This commit is contained in:
parent
2c3f8fb9fe
commit
8555e8f00e
@ -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;
|
$channel = lc $channel;
|
||||||
$mask = lc $mask;
|
$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->{pbot}->{logger}->log("Banning $channel +$mode $mask\n");
|
||||||
$self->add_to_ban_queue($channel, $mode, $mask);
|
$self->add_to_ban_queue($channel, $mode, $mask);
|
||||||
if ($immediately) {
|
if (not defined $immediately or $immediately != 0) {
|
||||||
$self->flush_ban_queue;
|
$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;
|
$mask = lc $mask;
|
||||||
$channel = lc $channel;
|
$channel = lc $channel;
|
||||||
$self->{pbot}->{logger}->log("Unbanning $channel -$mode $mask\n");
|
$self->{pbot}->{logger}->log("Unbanning $channel -$mode $mask\n");
|
||||||
$self->unmode_user($channel, $mode, $mask, $immediately);
|
$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;
|
$mask = lc $mask;
|
||||||
$channel = lc $channel;
|
$channel = lc $channel;
|
||||||
$self->{pbot}->{logger}->log("Removing mode $mode from $mask in $channel\n");
|
$self->{pbot}->{logger}->log("Removing mode $mode from $mask in $channel\n");
|
||||||
|
@ -25,8 +25,8 @@ 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 => 4652,
|
BUILD_REVISION => 4653,
|
||||||
BUILD_DATE => "2023-04-21",
|
BUILD_DATE => "2023-04-28",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
Reference in New Issue
Block a user