mirror of
git://scm.dxcluster.org/scm/spider
synced 2024-09-21 07:47:10 +00:00
add_thingy patch backport from mojo
This commit is contained in:
parent
85db230275
commit
094499a2f2
@ -1420,32 +1420,40 @@ sub _add_thingy
|
||||
my ($call, $is_node, $is_extnode, $here, $version, $build, $ip) = @$s;
|
||||
my @rout;
|
||||
|
||||
# remove spurious IPV6 prefix on IPV4 addresses
|
||||
$ip =~ s/^::ffff:// if $ip;
|
||||
|
||||
if ($call) {
|
||||
my $ncall = $parent->call;
|
||||
if ($is_node) {
|
||||
dbg("ROUTE: added node $call to $ncall") if isdbg('routelow');
|
||||
@rout = $parent->add($call, $version, Route::here($here), $ip);
|
||||
my $r = Route::Node::get($call);
|
||||
$r->PC92C_dxchan($dxchan->call, $hops) if $r;
|
||||
if ($ip) {
|
||||
$r->ip($ip);
|
||||
Log('DXProt', "PC92A $call -> $ip on $ncall");
|
||||
if ($ncall ne $call) {
|
||||
if ($is_node) {
|
||||
dbg("ROUTE: added node $call to $ncall") if isdbg('routelow');
|
||||
@rout = $parent->add($call, $version, Route::here($here), $ip);
|
||||
my $r = Route::Node::get($call);
|
||||
$r->PC92C_dxchan($dxchan->call, $hops) if $r;
|
||||
if ($ip) {
|
||||
$r->ip($ip);
|
||||
Log('DXProt', "PC92A $call -> $ip on $ncall");
|
||||
}
|
||||
} else {
|
||||
dbg("ROUTE: added user $call to $ncall") if isdbg('routelow');
|
||||
@rout = $parent->add_user($call, Route::here($here), $ip);
|
||||
$dxchan->tell_buddies('loginb', $call, $ncall) if $dxchan;
|
||||
my $r = Route::User::get($call);
|
||||
if ($ip) {
|
||||
$r->ip($ip);
|
||||
Log('DXProt', "PC92A $call -> $ip on $ncall");
|
||||
}
|
||||
}
|
||||
if ($pc92_slug_changes && $parent == $main::routeroot) {
|
||||
$things_add{$call} = Route::get($call);
|
||||
delete $things_del{$call};
|
||||
}
|
||||
} else {
|
||||
dbg("ROUTE: added user $call to $ncall") if isdbg('routelow');
|
||||
@rout = $parent->add_user($call, Route::here($here), $ip);
|
||||
$dxchan->tell_buddies('loginb', $call, $ncall) if $dxchan;
|
||||
my $r = Route::User::get($call);
|
||||
if ($ip) {
|
||||
$r->ip($ip);
|
||||
Log('DXProt', "PC92A $call -> $ip on $ncall");
|
||||
}
|
||||
}
|
||||
if ($pc92_slug_changes && $parent == $main::routeroot) {
|
||||
$things_add{$call} = Route::get($call);
|
||||
delete $things_del{$call};
|
||||
dbg("DXProt::add_thingy: Trying to add parent $call to itself $ncall, ignored");
|
||||
}
|
||||
}
|
||||
|
||||
return @rout;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user