as well.
DXProt::broadcast_users($buf, 'dx', \@spot);
# send it orf to the cluster (hang onto your tin helmets)
- DXProt::broadcast_ak1a(DXProt::pc11($spotter, $freq, $spotted, $line));
+ DXProt::broadcast_all_ak1a(DXProt::pc11($spotter, $freq, $spotted, $line), $DXProt::me);
}
}
my $long = $ref->long;
my $node = $ref->homenode;
my $latlong = DXBearing::lltos($lat, $long) if $lat && $long;
- DXProt::broadcast_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
- DXProt::broadcast_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
- DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
- DXProt::broadcast_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name;
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth;
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong;
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node;
}
}
}
}
Log('msg', "Message $ref->{msgno} from $ref->{from} to $ref->{to} deleted by $call");
if ($full) {
- DXProt::broadcast_ak1a(DXProt::pc49($self->call, $ref->{subject}), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc49($self->call, $ref->{subject}), $DXProt::me);
}
$ref->del_msg;
push @out, "Message $msgno deleted";
if ($dxchan && $ref) {
$dxchan->here(1);
$ref->here(1);
- DXProt::broadcast_ak1a(DXProt::pc24($ref));
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
push @out, $self->msg('heres', $call);
} else {
push @out, $self->msg('e3', "Set Here", $call);
$line = uc $line;
$user->homenode($line);
$user->put();
- DXProt::broadcast_ak1a(DXProt::pc41($call, 4, $line), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $line), $DXProt::me);
return (1, $self->msg('hnode', $line));
} else {
return (1, $self->msg('namee2', $call));
my ($lat, $long) = DXBearing::stoll($line);
$user->lat($lat);
$user->long($long);
- DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
if (!$user->qra) {
my $qra = DXBearing::lltos($lat, $long);
$user->qra($qra);
if ($user) {
$user->name($line);
$user->put();
- DXProt::broadcast_ak1a(DXProt::pc41($call, 1, $line), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $line), $DXProt::me);
return (1, $self->msg('name', $line));
} else {
return (1, $self->msg('namee2', $call));
$user->lat($lat);
$user->long($long);
my $s = DXBearing::lltos($lat, $long);
- DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me);
}
$user->put();
if ($user) {
$user->qth($line);
$user->put();
- DXProt::broadcast_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me);
return (1, $self->msg('qth', $line));
} else {
return (1, $self->msg('namee2', $call));
my ($lat, $long) = DXBearing::stoll($line);
$user->lat($lat);
$user->long($long);
- DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me);
if (!$user->qra) {
my $qra = DXBearing::lltos($lat, $long);
$user->qra($qra);
$user->lat($lat);
$user->long($long);
my $s = DXBearing::lltos($lat, $long);
- DXProt::broadcast_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me);
+ DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me);
}
$user->put();
if ($dxchan && $ref) {
$dxchan->here(0);
$ref->here(0);
- DXProt::broadcast_ak1a(DXProt::pc24($ref));
+ DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me);
push @out, $self->msg('hereu', $call);
} else {
push @out, $self->msg('e3', "Unset Here", $call);
if ($to ne "LOCAL") {
$line =~ s/\^//og; # remove ^ characters!
my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 1);
- DXProt::broadcast_ak1a($pc);
+ DXProt::broadcast_ak1a($pc, $DXProt::me);
}
return (1, ());
# issue a pc16 to everybody interested
my $nchan = DXChannel->get($main::mycall);
my @pc16 = DXProt::pc16($nchan, $cuser);
- DXProt::broadcast_ak1a(@pc16);
+ for (@pc16) {
+ DXProt::broadcast_all_ak1a($_);
+ }
Log('DXCommand', "$call connected");
# send prompts and things
# issue a pc17 to everybody interested
my $nchan = DXChannel->get($main::mycall);
my $pc17 = $nchan->pc17($self);
- DXProt::broadcast_ak1a($pc17);
+ DXProt::broadcast_all_ak1a($pc17);
Log('DXCommand', "$call disconnected");
$ref->del() if $ref;
}
}
-# broadcast a message to all clusters [except those mentioned after buffer]
+# broadcast a message to all clusters taking into account isolation
+# [except those mentioned after buffer]
sub broadcast_ak1a
{
my $s = shift; # the line to be rebroadcast
}
}
+# broadcast a message to all clusters ignoring isolation
+# [except those mentioned after buffer]
+sub broadcast_all_ak1a
+{
+ my $s = shift; # the line to be rebroadcast
+ my @except = @_; # to all channels EXCEPT these (dxchannel refs)
+ my @dxchan = get_all_ak1a();
+ my $dxchan;
+
+ # send it if it isn't the except list and isn't isolated and still has a hop count
+ foreach $dxchan (@dxchan) {
+ next if grep $dxchan == $_, @except;
+ my $routeit = adjust_hops($dxchan, $s); # adjust its hop count by node name
+ $dxchan->send($routeit);
+ }
+}
+
# broadcast to all users
# storing the spot or whatever until it is in a state to receive it
sub broadcast_users