From f71dcfcf0e1de4f9c59e10d73202f04b30281acc Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 13 Nov 2017 08:42:56 -0800 Subject: [PATCH] Limit max comma-separated kicks to 5 --- PBot/ChanOpCommands.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PBot/ChanOpCommands.pm b/PBot/ChanOpCommands.pm index c90a7518..19090e05 100644 --- a/PBot/ChanOpCommands.pm +++ b/PBot/ChanOpCommands.pm @@ -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);