X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=perl%2FDXProtout.pm;h=9fb0b7113b3da06728e592f38a490af021caae47;hp=66252c7aac3f441dfa67813e2ee264cdc10bf5dc;hb=fdc1150da7dbd9c1094d8df7a4744fb917017ed2;hpb=7432cb12ce865030c8b0315a30764e0088a59102 diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 66252c7a..9fb0b711 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -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