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));
|
$self->{pbot}->{logger}->log(sprintf("%-18s | %-65s | %s\n", "NICKCHANGE", $mask, $text));
|
||||||
|
|
||||||
my ($newnick) = $text =~ m/NICKCHANGE (.*)/;
|
my ($newnick) = $text =~ m/NICKCHANGE (.*)/;
|
||||||
if($newnick =~ m/^Guest\d+$/) {
|
$mask = "$newnick!$user\@$host";
|
||||||
# Don't enforce for services-mandated change to guest account
|
$account = $self->{pbot}->{messagehistory}->get_message_account($newnick, $user, $host);
|
||||||
} else {
|
$nick = $newnick;
|
||||||
$mask = "$newnick!$user\@$host";
|
$self->{nickflood}->{$account}->{changes}++;
|
||||||
$account = $self->{pbot}->{messagehistory}->get_message_account($newnick, $user, $host);
|
|
||||||
$nick = $newnick;
|
|
||||||
$self->{nickflood}->{$account}->{changes}++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$self->{pbot}->{logger}->log(sprintf("%-18s | %-65s | %s\n", lc $channel eq lc $mask ? "QUIT" : $channel, $mask, $text));
|
$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