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:
parent
541b8a31eb
commit
f71dcfcf0e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user