From 260b1405a729a33491fcb877e1e1d4452a70ed01 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 8 Aug 2015 12:40:06 -0700 Subject: [PATCH] Enforce nick-change flood on Guest nicks --- PBot/AntiFlood.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/PBot/AntiFlood.pm b/PBot/AntiFlood.pm index 85dea8d8..01d721a6 100644 --- a/PBot/AntiFlood.pm +++ b/PBot/AntiFlood.pm @@ -192,14 +192,10 @@ sub check_flood { $self->{pbot}->{logger}->log(sprintf("%-18s | %-65s | %s\n", "NICKCHANGE", $mask, $text)); my ($newnick) = $text =~ m/NICKCHANGE (.*)/; - if($newnick =~ m/^Guest\d+$/) { - # Don't enforce for services-mandated change to guest account - } else { - $mask = "$newnick!$user\@$host"; - $account = $self->{pbot}->{messagehistory}->get_message_account($newnick, $user, $host); - $nick = $newnick; - $self->{nickflood}->{$account}->{changes}++; - } + $mask = "$newnick!$user\@$host"; + $account = $self->{pbot}->{messagehistory}->get_message_account($newnick, $user, $host); + $nick = $newnick; + $self->{nickflood}->{$account}->{changes}++; } else { $self->{pbot}->{logger}->log(sprintf("%-18s | %-65s | %s\n", lc $channel eq lc $mask ? "QUIT" : $channel, $mask, $text)); }