projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix merge command
[spider.git]
/
perl
/
DXProtout.pm
diff --git
a/perl/DXProtout.pm
b/perl/DXProtout.pm
index 786d78c0f8d08c8be09704d6fdbd81bd8bd06567..95c1981359262202c5e255752327453540f640a7 100644
(file)
--- a/
perl/DXProtout.pm
+++ b/
perl/DXProtout.pm
@@
-78,8
+78,8
@@
sub pc16
my $ncall = $node->call;
my @out;
my $ncall = $node->call;
my @out;
- my $str = "PC16^$ncall";
while (@_) {
while (@_) {
+ my $str = "PC16^$ncall";
for ( ; @_ && length $str < 200; ) {
my $ref = shift;
$str .= sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here;
for ( ; @_ && length $str < 200; ) {
my $ref = shift;
$str .= sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here;
@@
-165,7
+165,7
@@
sub pc24
my $self = shift;
my $call = $self->call;
my $flag = $self->here ? '1' : '0';
my $self = shift;
my $call = $self->call;
my $flag = $self->here ? '1' : '0';
- my $hops = get_hops(24);
+ my $hops =
shift ||
get_hops(24);
return "PC24^$call^$flag^$hops^";
}
return "PC24^$call^$flag^$hops^";
}
@@
-195,6
+195,7
@@
sub pc28
my $time = ztime($t);
$private = $private ? '1' : '0';
$rr = $rr ? '1' : '0';
my $time = ztime($t);
$private = $private ? '1' : '0';
$rr = $rr ? '1' : '0';
+ $subject ||= ' ';
return "PC28^$tonode^$fromnode^$to^$from^$date^$time^$private^$subject^ ^5^$rr^ ^$origin^~";
}
return "PC28^$tonode^$fromnode^$to^$from^$date^$time^$private^$subject^ ^5^$rr^ ^$origin^~";
}
@@
-275,9
+276,12
@@
sub pc40
# user info
sub pc41
{
# user info
sub pc41
{
- my ($call, $sort, $info) = @_;
- my $hops = get_hops(41);
- $sort = $sort ? "$sort" : '0';
+ my $call = shift;
+ $call = shift if ref $call;
+
+ my $sort = shift || '0';
+ my $info = shift || ' ';
+ my $hops = shift || get_hops(41);
return "PC41^$call^$sort^$info^$hops^~";
}
return "PC41^$call^$sort^$info^$hops^~";
}
@@
-321,9
+325,11
@@
sub pc49
# periodic update of users, plus keep link alive device (always H99)
sub pc50
{
# periodic update of users, plus keep link alive device (always H99)
sub pc50
{
- my $n = shift;
- $n = 0 unless $n >= 0;
- return "PC50^$main::mycall^$n^H99^";
+ my $self = shift;
+ my $call = $self->call;
+ my $n = shift || '0';
+ my $hops = shift || 'H99';
+ return "PC50^$call^$n^$hops^";
}
# generate pings
}
# generate pings