Commands/ChanOp: minor code-formatting clean-up

This commit is contained in:
Pragmatic Software 2023-05-05 18:59:35 -07:00
parent 15d7abf5ec
commit 097c657f0c
1 changed files with 5 additions and 1 deletions

View File

@ -626,11 +626,14 @@ sub do_ban_or_mute($self, $context, $mode) {
if (not $length) {
# TODO: user account length override
$length = $self->{pbot}->{registry}->get_value($channel, "default_${mode}_timeout", 0, $context)
// $self->{pbot}->{registry}->get_value('general', "default_${mode}_timeout", 0, $context) // 60 * 60 * 24; # 24 hours
// $self->{pbot}->{registry}->get_value('general', "default_${mode}_timeout", 0, $context)
// 60 * 60 * 24; # 24 hours
}
$self->{pbot}->{banlist}->ban_user_timed($channel, $mode eq 'ban' ? 'b' : 'q', $mask, $length, $context->{hostmask}, $reason, $immediately);
$duration = $length > 0 ? duration $length : 'all eternity';
if ($immediately) {
$result .= "$sep$mask " . ($mode eq 'ban' ? 'banned' : 'muted') . " in $channel ($duration)";
$result .= " because $reason" if defined $reason;
@ -648,6 +651,7 @@ sub do_ban_or_mute($self, $context, $mode) {
}
$result = "/msg $context->{nick} $result" if $result !~ m/remaining/;
return $result;
}