projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new version of ip address storage
[spider.git]
/
perl
/
DXProtHandle.pm
diff --git
a/perl/DXProtHandle.pm
b/perl/DXProtHandle.pm
index 0c71e5900d96d3fb5ebd3a01360993d92be8ba05..6dc13795deccd8ff99c2c8530e961536155baec9 100644
(file)
--- a/
perl/DXProtHandle.pm
+++ b/
perl/DXProtHandle.pm
@@
-232,16
+232,18
@@
sub handle_11
my $ip = $spot[14] if exists $spot[14];
my $implied = '';
if ($ip) {
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 {
} else {
- $ip ||= $r->ip if $r;
- $ip ||= $user->ip;
+ $ip ||= $r->ip
($spot[7])
if $r;
+ $ip ||= $user->ip
($spot[7])
;
$implied = '*' if $ip;
}
if (isdbg('progress')) {
$implied = '*' if $ip;
}
if (isdbg('progress')) {
- my $sip = $ip ? sprintf "($ip$implied)" : ''
unless $ip =~ m|[\(\)\*]|
;
+ 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);
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);
@@
-1521,10
+1523,11
@@
sub _add_thingy
$user->sort('U') unless $user->sort;
}
}
$user->sort('U') unless $user->sort;
}
}
- $ip ||= $user->ip;
+ $ip ||= $user->ip
($ncall)
;
if ($ip) {
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');
my $s = "PC92A $call -> $ip on $ncall";
Log('DXProt', $s);
dbg($s) if isdbg('routelow');