Make sure that an IP address (even 127.0.0.1) is always found.
Don't send PC41 if home isn't changed
set senderverify default = 0.
my ($self, $line) = @_;
#$DB::single = 1;
+my $addr = $self->hostname || '127.0.0.1';
+Log('cmd', "$self->{call}|$addr|announce|$line");
my @f = split /\s+/, $line;
return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
return (1, $self->msg('e9')) if !@f;
return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
return (1, $self->msg('e28')) unless $self->isregistered;
+
+my $addr = $self->hostname || '127.0.0.1'
+Log('cmd', "$self->{call}|$addr|dx|$line");
+
my @bad;
if (@bad = BadWords::check($line)) {
$self->badcount(($self->badcount||0) + @bad);
$line =~ s/\t+/ /g; # do this here because it needs to be stopped ASAP!
$line ||= ' ';
-my $addr = $self->hostname;
if ($self->conn && $self->conn->peerhost) {
-# $ipaddr = $addr unless !is_ipaddr($addr) || $addr =~ /^127\./ || $addr =~ /^::[0-9a-f]+$/;
$ipaddr ||= $addr; # force a PC61
} elsif ($self->inscript) {
$ipaddr = "script";
$user = DXUser::get_current($call);
if ($user) {
- $line = uc $line;
- $user->homenode($line);
- $user->put();
- my $s = DXProt::pc41($call, 4, $line);
- DXProt::eph_dup($s);
- DXChannel::broadcast_all_nodes($s, $main::me) ;
+ $line = uc unpad($line);
+ if ($user->homenode && $line ne $user->homenode) {
+ $user->homenode($line);
+ $user->put();
+ my $s = DXProt::pc41($call, 4, $line);
+ DXProt::eph_dup($s);
+ DXChannel::broadcast_all_nodes($s, $main::me);
+ }
return (1, $self->msg('hnode', $line));
} else {
return (1, $self->msg('namee2', $call));
sub handle
{
my ($self, $line) = @_;
-
+
return (1, $self->msg('e24')) unless $Internet::allow;
my @out;
my $port = 80;
my $path = qq{/xml/current/?callsign=$line;username=$Internet::qrz_uid;password=$Internet::qrz_pw;agent=dxspider};
dbg("qrz: $target:$port$path") if isdbg('qrz');
-
- Log('call', "$call: show/qrz \U$line");
+ my $addr = $self->hostname || '127.0.0.1';
+ Log('cmd', "$self->{call}|$addr|show/qrz|$line");
my $conn = AsyncMsg->get($self, $target, $path, filter=>\&filter, prefix=>'qrz> ', on_disc=>\&_on_disc);
if ($conn) {
$conn->{state} = 'blank';
# set up basic environment
$self->call($call);
$self->user($user);
-Log('DXCommand', "spoof '$newline' as $call by $mycall");
+my $addr = $self->hostname || '127.0.0.1'
+Log('cmd', "$self->{call}|$addr|spoof|$line");
my @in = $self->run_cmd($newline);
push @out, map {"spoof $call: $_"} @in;
$self->call($mycall);
if ($package && $self->can("${package}::handle")) {
no strict 'refs';
dbg("cmd: package $package") if isdbg('command');
+# Log('cmd', "$self->{call} on $self->{hostname} : '$cmd $args'");
my $t0 = [gettimeofday];
eval { @ans = &{"${package}::handle"}($self, $args) };
if ($@) {
$pc92_keepalive_period = 1*60*60; # frequency of PC92 K (keepalive) records
%pc92_find = (); # outstanding pc92 find operations
$pc92_find_timeout = 30; # maximum time to wait for a reply
-$senderverify = 1; # 1 = check spotter is on node it says it is and check ip address if available
+$senderverify = 0; # 1 = check spotter is on node it says it is and check ip address if available
# 2 = do 1 and dump if check