3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-20 02:49:49 +01:00

Channels: chanrem now removes ban and mute timeouts as well

This commit is contained in:
Pragmatic Software 2020-01-23 21:46:51 -08:00
parent 4e2a17a5ed
commit 7dc8ac0623

View File

@ -77,6 +77,22 @@ sub remove {
return "Usage: chanrem <channel>";
}
$arguments = lc $arguments;
# clear unban timeouts
if (exists $self->{pbot}->{chanops}->{unban_timeout}->{hash}->{$arguments}) {
delete $self->{pbot}->{chanops}->{unban_timeout}->{hash}->{$arguments};
$self->{pbot}->{chanops}->{unban_timeout}->save;
}
# clear unmute timeouts
if (exists $self->{pbot}->{chanops}->{unmute_timeout}->{hash}->{$arguments}) {
delete $self->{pbot}->{chanops}->{unmute_timeout}->{hash}->{$arguments};
$self->{pbot}->{chanops}->{unmute_timeout}->save;
}
# TODO: ignores, etc?
return $self->{channels}->remove($arguments);
}