mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Restore immediately
functionality to unban/unmute
This commit is contained in:
parent
1dcbcef14a
commit
53c6177801
@ -112,7 +112,7 @@ sub unban_user {
|
|||||||
|
|
||||||
return "/msg $nick Usage for /msg: unban <nick/mask> <channel>" if $channel !~ /^#/;
|
return "/msg $nick Usage for /msg: unban <nick/mask> <channel>" if $channel !~ /^#/;
|
||||||
|
|
||||||
$self->{pbot}->{chanops}->unban_user($target, $channel);
|
$self->{pbot}->{chanops}->unban_user($target, $channel, 1);
|
||||||
return "/msg $nick $target has been unbanned from $channel.";
|
return "/msg $nick $target has been unbanned from $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ sub unmute_user {
|
|||||||
|
|
||||||
return "/msg $nick Usage for /msg: unmute <mask> <channel>" if $channel !~ /^#/;
|
return "/msg $nick Usage for /msg: unmute <mask> <channel>" if $channel !~ /^#/;
|
||||||
|
|
||||||
$self->{pbot}->{chanops}->unmute_user($target, $channel);
|
$self->{pbot}->{chanops}->unmute_user($target, $channel, 1);
|
||||||
return "/msg $nick $target has been unmuted in $channel.";
|
return "/msg $nick $target has been unmuted in $channel.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ sub ban_user {
|
|||||||
|
|
||||||
sub unban_user {
|
sub unban_user {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($mask, $channel) = @_;
|
my ($mask, $channel, $immediately) = @_;
|
||||||
|
|
||||||
my $bans;
|
my $bans;
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ sub unban_user {
|
|||||||
$unbanned{$baninfo->{banmask}} = 1;
|
$unbanned{$baninfo->{banmask}} = 1;
|
||||||
$self->add_to_unban_queue($channel, 'b', $baninfo->{banmask});
|
$self->add_to_unban_queue($channel, 'b', $baninfo->{banmask});
|
||||||
}
|
}
|
||||||
$self->check_unban_queue;
|
$self->check_unban_queue if $immediately;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub ban_user_timed {
|
sub ban_user_timed {
|
||||||
@ -214,7 +214,7 @@ sub mute_user {
|
|||||||
|
|
||||||
sub unmute_user {
|
sub unmute_user {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($mask, $channel) = @_;
|
my ($mask, $channel, $immediately) = @_;
|
||||||
$mask = lc $mask;
|
$mask = lc $mask;
|
||||||
$channel = lc $channel;
|
$channel = lc $channel;
|
||||||
$self->{pbot}->{logger}->log("Unmuting $channel $mask\n");
|
$self->{pbot}->{logger}->log("Unmuting $channel $mask\n");
|
||||||
@ -225,7 +225,7 @@ sub unmute_user {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->add_to_unban_queue($channel, 'q', $mask);
|
$self->add_to_unban_queue($channel, 'q', $mask);
|
||||||
$self->check_unban_queue;
|
$self->check_unban_queue if $immediately;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub mute_user_timed {
|
sub mute_user_timed {
|
||||||
|
Loading…
Reference in New Issue
Block a user