extend the Web interface protocol further
[spider.git] / perl / DXProt.pm
index 7064dc7f84736a7e8bd1f51880dd0846b06d0b57..68dd099ee457564acb15ddd1c2232553987b4f25 100644 (file)
@@ -232,7 +232,8 @@ sub update_pc92_keepalive
 
 sub init
 {
-       do "$main::data/hop_table.pl" if -e "$main::data/hop_table.pl";
+       my $fn = localdata("hop_table.pl");
+       do $fn if -e $fn;
        confess $@ if $@;
 
        my $user = DXUser::get($main::mycall);
@@ -291,6 +292,7 @@ sub start
        my $host = $self->{conn}->peerhost;
        $host ||= "AGW Port #$self->{conn}->{agwport}" if exists $self->{conn}->{agwport};
        $host ||= "unknown";
+       $self->{hostname} = $host if is_ipaddr($host);
 
        Log('DXProt', "$call connected from $host");