mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 12:29:27 +01:00
Limit max comma-separated kicks to 5
This commit is contained in:
parent
541b8a31eb
commit
f71dcfcf0e
@ -267,12 +267,14 @@ sub kick_user {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my @nicks = split /,/, $victim;
|
my @nicks = split /,/, $victim;
|
||||||
|
my $i = 0;
|
||||||
foreach my $n (@nicks) {
|
foreach my $n (@nicks) {
|
||||||
$self->{pbot}->{chanops}->add_op_command($channel, "kick $channel $n $reason");
|
$self->{pbot}->{chanops}->add_op_command($channel, "kick $channel $n $reason");
|
||||||
if (@insults) {
|
if (@insults) {
|
||||||
$reason = $insults[rand @insults];
|
$reason = $insults[rand @insults];
|
||||||
$reason =~ s/\s+$//;
|
$reason =~ s/\s+$//;
|
||||||
}
|
}
|
||||||
|
last if ++$i >= 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->{pbot}->{chanops}->gain_ops($channel);
|
$self->{pbot}->{chanops}->gain_ops($channel);
|
||||||
|
Loading…
Reference in New Issue
Block a user