mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-05 19:49:32 +01:00
Check for bans when CHGHOST
Remove redundant message type from log message
This commit is contained in:
parent
9f314cd365
commit
47d8f5724a
@ -154,7 +154,8 @@ sub check_flood {
|
||||
$self->{pbot}->{logger}->log("[MSG] $channel ($account) $mask => $text\n");
|
||||
} else {
|
||||
my $from = $channel eq lc $mask ? undef : $channel;
|
||||
my ($type) = $text =~ /^(\w+) /;
|
||||
$text =~ s/^(\w+) //;
|
||||
my $type = $1;
|
||||
$self->{pbot}->{logger}->log("[$type] " . (defined $from ? "$from " : '') . "($account) $mask => $text\n");
|
||||
}
|
||||
}
|
||||
|
@ -203,7 +203,13 @@ sub on_chghost {
|
||||
|
||||
$self->{pbot}->{logger}->log("[CHGHOST] ($account) $nick!$user\@$host changed host to ($id) $nick!$newuser\@$newhost\n");
|
||||
|
||||
return 1;
|
||||
my $channels = $self->{pbot}->{nicklist}->get_channels($nick);
|
||||
|
||||
foreach my $channel (@$channels) {
|
||||
$self->{pbot}->{antiflood}->check_bans($id, "$nick!$newuser\@$newhost", $channel);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub log_first_arg {
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4615,
|
||||
BUILD_REVISION => 4616,
|
||||
BUILD_DATE => "2023-02-02",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user