Limit max comma-separated kicks to 5

This commit is contained in:
Pragmatic Software 2017-11-13 08:42:56 -08:00
parent 541b8a31eb
commit f71dcfcf0e
1 changed files with 2 additions and 0 deletions

View File

@ -267,12 +267,14 @@ sub kick_user {
}
my @nicks = split /,/, $victim;
my $i = 0;
foreach my $n (@nicks) {
$self->{pbot}->{chanops}->add_op_command($channel, "kick $channel $n $reason");
if (@insults) {
$reason = $insults[rand @insults];
$reason =~ s/\s+$//;
}
last if ++$i >= 5;
}
$self->{pbot}->{chanops}->gain_ops($channel);