3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 13:59:47 +01:00

Remove ban/mute from time-outs if using "forever"

This commit is contained in:
Pragmatic Software 2015-06-07 18:02:35 -07:00
parent 828bf2fa78
commit 75655f5d81

View File

@ -130,6 +130,10 @@ sub ban_user_timed {
if ($length > 0) {
$self->{unban_timeout}->hash->{$channel}->{$mask}{timeout} = gettimeofday + $length;
$self->{unban_timeout}->save;
} else {
if ($self->{pbot}->{chanops}->{unban_timeout}->find_index($channel, $mask)) {
$self->{pbot}->{chanops}->{unban_timeout}->remove($channel, $mask);
}
}
}
@ -162,6 +166,10 @@ sub mute_user_timed {
if ($length > 0) {
$self->{unmute_timeout}->hash->{$channel}->{$mask}{timeout} = gettimeofday + $length;
$self->{unmute_timeout}->save;
} else {
if ($self->{pbot}->{chanops}->{unmute_timeout}->find_index($channel, $mask)) {
$self->{pbot}->{chanops}->{unmute_timeout}->remove($channel, $mask);
}
}
}