3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-12-23 19:22:40 +01:00

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

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);