- my $user = DXUser::get_current($call);
- my $r;
- my $newuser = !$user;
- $user = DXUser->new($call) unless $user;
- $user->homenode($parent->call) unless $user->homenode;
- $user->node($parent->call);
- $user->lastin($main::systime) unless DXChannel::get($ncall);
- if ($is_node) {
- dbg("ROUTE: added node $call to $ncall") if isdbg('routelow');
- @rout = $parent->add($call, $version, Route::here($here), $ip);
- $r = Route::Node::get($call);
- $r->PC92C_dxchan($dxchan->call, $hops) if $r;
- if ($newuser) {
- $user->sort('S') unless $user->sort;
- $user->priv(1) unless exists $user->{priv};
- $user->lockout(1) unless exists $user->{lookout} || $main::me->call eq $call || DXChannel::get($call) || Msg::get($call);
+ 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");
+ }