diff --git a/PBot/ChanOpCommands.pm b/PBot/ChanOpCommands.pm index 24d82eba..b8c67141 100644 --- a/PBot/ChanOpCommands.pm +++ b/PBot/ChanOpCommands.pm @@ -112,7 +112,7 @@ sub unban_user { return "/msg $nick Usage for /msg: unban " 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."; } @@ -187,7 +187,7 @@ sub unmute_user { return "/msg $nick Usage for /msg: unmute " 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."; } diff --git a/PBot/ChanOps.pm b/PBot/ChanOps.pm index 6a2de9f3..e51b78b4 100644 --- a/PBot/ChanOps.pm +++ b/PBot/ChanOps.pm @@ -128,7 +128,7 @@ sub ban_user { sub unban_user { my $self = shift; - my ($mask, $channel) = @_; + my ($mask, $channel, $immediately) = @_; my $bans; @@ -168,7 +168,7 @@ sub unban_user { $unbanned{$baninfo->{banmask}} = 1; $self->add_to_unban_queue($channel, 'b', $baninfo->{banmask}); } - $self->check_unban_queue; + $self->check_unban_queue if $immediately; } sub ban_user_timed { @@ -214,7 +214,7 @@ sub mute_user { sub unmute_user { my $self = shift; - my ($mask, $channel) = @_; + my ($mask, $channel, $immediately) = @_; $mask = lc $mask; $channel = lc $channel; $self->{pbot}->{logger}->log("Unmuting $channel $mask\n"); @@ -225,7 +225,7 @@ sub unmute_user { } $self->add_to_unban_queue($channel, 'q', $mask); - $self->check_unban_queue; + $self->check_unban_queue if $immediately; } sub mute_user_timed {