$user = DXUser->new($spot[4]) unless $user;
my $r = Route::get($spot[4]);
my $ip = $spot[14] if exists $spot[14];
+ my $implied = '';
if ($ip) {
- $user->ip($ip), $user->put if !$user->ip || $user->ip ne $ip;
- $r->ip($ip) if $r && !$r->ip;
+ $ip =~ s/[\(\)\*]+//g; # strip these off :-)
+ $user->ip($spot[7], $ip);
+ $user->put;
+ $r->ip($spot[7], $ip) if $r;
} else {
- $ip ||= $r->ip if $r;
- $ip ||= $user->ip;
- $ip .= '*' if $ip;
+ $ip ||= $r->ip($spot[7]) if $r;
+ $ip ||= $user->ip($spot[7]);
+ $implied = '*' if $ip;
}
if (isdbg('progress')) {
- $ip = $ip ? sprintf "($ip)" : '';
- my $s = sprintf "SPOT: $spot[1] on $spot[0] \@ %s by $spot[4]$ip\@$spot[7]", cldatetime($spot[2]);
+ my $sip = $ip ? sprintf "($ip$implied)" : '';
+ my $s = sprintf "SPOT: $spot[1] on $spot[0] \@ %s by $spot[4]$sip\@$spot[7]", cldatetime($spot[2]);
$s .= " '$spot[3]'" if $spot[3];
dbg($s);
}
$user->sort('U') unless $user->sort;
}
}
- $ip ||= $user->ip;
+ $ip ||= $user->ip($ncall);
if ($ip) {
- $user->ip($ip);
- $r->ip($ip);
+ $ip =~ s/^::ffff://; # remove ipv6 stuff from the front of an ipv4 address
+ $user->ip($ncall, $ip);
+ $r->ip($ncall, $ip);
my $s = "PC92A $call -> $ip on $ncall";
Log('DXProt', $s);
dbg($s) if isdbg('routelow');