3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Enforce nick-change flood on Guest nicks

This commit is contained in:
Pragmatic Software 2015-08-08 12:40:06 -07:00
parent 499d91e07d
commit 260b1405a7

View File

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