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:
parent
499d91e07d
commit
260b1405a7
@ -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}++;
|
||||
}
|
||||
} else {
|
||||
$self->{pbot}->{logger}->log(sprintf("%-18s | %-65s | %s\n", lc $channel eq lc $mask ? "QUIT" : $channel, $mask, $text));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user