got some basic local user add and subtract database going

This commit is contained in:
djk 1998-09-20 21:45:08 +00:00
parent 7432cb12ce
commit fdc1150da7
2 changed files with 7 additions and 7 deletions

View File

@ -67,8 +67,8 @@ sub start
# issue a pc16 to everybody interested
my $nchan = DXChannel->get($main::mycall);
my $pc16 = $nchan->pc16($cuser);
DXProt::broadcast_ak1a($pc16);
my @pc16 = DXProt::pc16($nchan, $cuser);
DXProt::broadcast_ak1a(@pc16);
}
#
@ -153,7 +153,7 @@ sub finish
# issue a pc17 to everybody interested
my $nchan = DXChannel->get($main::mycall);
my $pc17 = $nchan->pc17($ref);
my $pc17 = $nchan->pc17($self);
DXProt::broadcast_ak1a($pc17);
$ref->del() if $ref;

View File

@ -69,11 +69,11 @@ sub pc16
my $self = shift;
my @out;
while (@_) {
foreach (@_) {
my $str = "PC16^$self->{call}";
my $i;
for ($i = 0; @_ && $i < $DXProt::pc16_max_users; $i++) {
for ($i = 0; @_ > 0 && $i < $DXProt::pc16_max_users; $i++) {
my $ref = shift;
$str .= sprintf "^%s %s %d", $ref->call, $ref->confmode ? '*' : '-', $ref->here;
}
@ -86,9 +86,9 @@ sub pc16
# remove a local user
sub pc17
{
my $self = shift;
my ($self, $ref) = @_;
my $hops = get_hops(17);
return "PC17^$self->{call}^$main::mycall^$hops^";
return "PC17^$self->{call}^$ref->{call}^$hops^";
}
# Request init string