3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-05 10:58:44 +02:00

Minor derp with log message

This commit is contained in:
Pragmatic Software 2016-08-26 04:52:38 -07:00
parent 255b42efee
commit 08a26a70a7

View File

@ -501,15 +501,19 @@ sub get_message_account {
} else { } else {
# handle cases like 99.57.140.149 vs 99-57-140-149.lightspeed.sntcca.sbcglobal.net # handle cases like 99.57.140.149 vs 99-57-140-149.lightspeed.sntcca.sbcglobal.net
if (defined $hostip) { if (defined $hostip) {
$match = 1 if $hostip eq $thost; if ($hostip eq $thost) {
$match = 1;
$self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n"); $self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n");
}
} elsif ($thost =~ m/(\d+[[:punct:]]\d+[[:punct:]]\d+[[:punct:]]\d+)\D/) { } elsif ($thost =~ m/(\d+[[:punct:]]\d+[[:punct:]]\d+[[:punct:]]\d+)\D/) {
my $thostip = $1; my $thostip = $1;
$thostip =~ s/[[:punct:]]/./g; $thostip =~ s/[[:punct:]]/./g;
$match = 1 if $thostip eq $host; if ($thostip eq $host) {
$match = 1;
$self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n"); $self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n");
} }
} }
}
if ($match) { if ($match) {
$rows->[0] = $row; $rows->[0] = $row;
@ -1103,18 +1107,22 @@ sub link_aliases {
} else { } else {
# handle cases like 99.57.140.149 vs 99-57-140-149.lightspeed.sntcca.sbcglobal.net # handle cases like 99.57.140.149 vs 99-57-140-149.lightspeed.sntcca.sbcglobal.net
if (defined $hostip) { if (defined $hostip) {
$ids{$row->{id}} = { id => $row->{id}, type => $self->{alias_type}->{STRONG} } if $hostip eq $thost; # don't force linking if ($hostip eq $thost) {
$ids{$row->{id}} = { id => $row->{id}, type => $self->{alias_type}->{STRONG} }; # don't force linking
$self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n"); $self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n");
}
} elsif ($thost =~ m/(\d+[[:punct:]]\d+[[:punct:]]\d+[[:punct:]]\d+)\D/) { } elsif ($thost =~ m/(\d+[[:punct:]]\d+[[:punct:]]\d+[[:punct:]]\d+)\D/) {
my $thostip = $1; my $thostip = $1;
$thostip =~ s/[[:punct:]]/./g; $thostip =~ s/[[:punct:]]/./g;
$ids{$row->{id}} = { id => $row->{id}, type => $self->{alias_type}->{STRONG} } if $thostip eq $host; # don't force linking if ($thostip eq $host) {
$ids{$row->{id}} = { id => $row->{id}, type => $self->{alias_type}->{STRONG} }; # don't force linking
$self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n"); $self->{pbot}->{logger}->log("IP vs hostname match: $host vs $thost\n");
} }
} }
} }
} }
} }
}
if ($nickserv) { if ($nickserv) {
my $sth = $self->{dbh}->prepare('SELECT id FROM Nickserv WHERE nickserv = ?'); my $sth = $self->{dbh}->prepare('SELECT id FROM Nickserv WHERE nickserv = ?');