mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Check for existing temp ban before temp-banning
This commit is contained in:
parent
7357ba706e
commit
29f6510ec2
@ -225,9 +225,11 @@ sub on_mode {
|
||||
}
|
||||
|
||||
if ($timeout && $self->{pbot}->{chanops}->can_gain_ops($channel)) {
|
||||
$self->{pbot}->{logger}->log("Temp ban for $target in $channel.\n");
|
||||
$self->{pbot}->{chanops}->{unban_timeout}->hash->{$channel}->{$target}{timeout} = gettimeofday + $timeout;
|
||||
$self->{pbot}->{chanops}->{unban_timeout}->save;
|
||||
if (not exists $self->{pbot}->{chanops}->{unban_timeout}->hash->{lc $channel}->{lc $target}) {
|
||||
$self->{pbot}->{logger}->log("Temp ban for $target in $channel.\n");
|
||||
$self->{pbot}->{chanops}->{unban_timeout}->hash->{$channel}->{$target}{timeout} = gettimeofday + $timeout;
|
||||
$self->{pbot}->{chanops}->{unban_timeout}->save;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user