mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 03:33:06 +01:00
Whoops, do check-bans on join for unidentified users as well when extended-join capability is active
This commit is contained in:
parent
8102e1bc21
commit
2c554328c9
@ -244,10 +244,10 @@ sub on_join {
|
||||
if ($event->{event}->{args}[0] ne '*') {
|
||||
$self->{pbot}->{messagehistory}->{database}->link_aliases($message_account, undef, $event->{event}->{args}[0]);
|
||||
$self->{pbot}->{antiflood}->check_nickserv_accounts($nick, $event->{event}->{args}[0]);
|
||||
|
||||
$self->{pbot}->{messagehistory}->{database}->devalidate_all_channels($message_account);
|
||||
$self->{pbot}->{antiflood}->check_bans($message_account, $event->{event}->from, $channel);
|
||||
}
|
||||
|
||||
$self->{pbot}->{messagehistory}->{database}->devalidate_channel($message_account, $channel);
|
||||
$self->{pbot}->{antiflood}->check_bans($message_account, $event->{event}->from, $channel);
|
||||
}
|
||||
|
||||
$self->{pbot}->{antiflood}->check_flood($channel, $nick, $user, $host, $msg,
|
||||
|
@ -1015,6 +1015,22 @@ sub get_channel_datas_with_enter_abuses {
|
||||
return $channel_datas;
|
||||
}
|
||||
|
||||
sub devalidate_channel {
|
||||
my ($self, $id, $channel, $mode) = @_;
|
||||
|
||||
$mode = 0 if not defined $mode;
|
||||
|
||||
eval {
|
||||
my $sth = $self->{dbh}->prepare("UPDATE Channels SET validated = ? WHERE id = ? AND channel = ?");
|
||||
$sth->bind_param(1, $mode);
|
||||
$sth->bind_param(2, $id);
|
||||
$sth->bind_param(3, $channel);
|
||||
$sth->execute();
|
||||
$self->{new_entries}++;
|
||||
};
|
||||
$self->{pbot}->{logger}->log($@) if $@;
|
||||
}
|
||||
|
||||
sub devalidate_all_channels {
|
||||
my ($self, $id, $mode) = @_;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user