projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add CTY-2008 from cty_wt.dat, stop chat on pc12
[spider.git]
/
perl
/
Msg.pm
diff --git
a/perl/Msg.pm
b/perl/Msg.pm
index c9b58a482cb19398d9e94cc3cf471e3f69bb801d..f2bb29768169b02b953887dcc6395a42d7b7175d 100644
(file)
--- a/
perl/Msg.pm
+++ b/
perl/Msg.pm
@@
-193,10
+193,19
@@
sub pid_gone
}
}
}
}
+sub ax25
+{
+ my $conn = shift;
+ return $conn->{csort} eq 'ax25';
+}
+
sub peerhost
{
sub peerhost
{
- my $self = shift;
- return $self->{peerhost};
+ my $conn = shift;
+ $conn->{peerhost} ||= 'ax25' if $conn->ax25;
+ $conn->{peerhost} ||= $conn->{sock}->peerhost if $conn->{sock} && $conn->{sock}->isa('IO::Socket::INET');
+ $conn->{peerhost} ||= 'UNKNOWN';
+ return $conn->{peerhost};
}
#-----------------------------------------------------------------
}
#-----------------------------------------------------------------