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:
parent
4e2a17a5ed
commit
7dc8ac0623
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user