# Store it here (but only if it isn't baddx)
my $t = (int ($main::systime/60)) * 60;
-return (1, $self->msg('dup')) if Spot::dup($freq, $spotted, $t, $line, $spotter);
+return (1, $self->msg('dupspot')) if Spot::dup($freq, $spotted, $t, $line, $spotter);
my @spot = Spot::prepare($freq, $spotted, $t, $line, $spotter, $main::mycall);
if ($DXProt::baddx->in($spotted) || $freq =~ /^69/ || $localonly) {
$main::build += $VERSION;
$main::branch += $BRANCH;
+use vars qw($sentencelth);
+
+$sentencelth = 200;
+
#
# All the PCxx generation routines
#
my $ncall = $node->call;
my @out;
- while (@_) {
- my $str = "PC16^$ncall";
- for ( ; @_ && length $str < 200; ) {
- my $ref = shift;
- $str .= sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here;
+ my $s = "";
+ for (@_) {
+ next unless $_;
+ my $ref = $_;
+ my $str = sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here;
+ if (length($s) + length($str) >= $sentencelth) {
+ push @out, "PC16^$ncall" . $s . sprintf "^%s^", get_hops(16);
+ $s = "";
}
- $str .= sprintf "^%s^", get_hops(16);
- push @out, $str;
+ $s .= $str;
}
+ push @out, "PC16^$ncall" . $s . sprintf "^%s^", get_hops(16) if length $s;
return @out;
}
sub pc19
{
my @out;
-
- while(@_) {
- my $str = "PC19";
- for (; @_ && length $str < 200;) {
- my $ref = shift;
- my $call = $ref->call;
- my $here = $ref->here;
- my $conf = $ref->conf;
- my $version = $ref->version;
- $str .= "^$here^$call^$conf^$version";
+ my @in;
+
+ my $s = "";
+ for (@_) {
+ next unless $_;
+ my $ref = $_;
+ my $call = $ref->call;
+ my $here = $ref->here;
+ my $conf = $ref->conf;
+ my $version = $ref->version;
+ my $str = "^$here^$call^$conf^$version";
+ if (length($s) + length($str) >= $sentencelth) {
+ push @out, "PC19" . $s . sprintf "^%s^", get_hops(19);
+ $s = "";
}
- $str .= sprintf "^%s^", get_hops(19);
- push @out, $str;
+ $s .= $str;
}
+ push @out, "PC19" . $s . sprintf "^%s^", get_hops(19) if length $s;
return @out;
}
wantann_talk => '0,Talklike Anns,yesno',
wantpc90 => '1,Req PC90,yesno',
wantnp => '1,Req New Protocol,yesno',
+ wantusers => '9,Want Users from node,yesno',
+ wantsendusers => '9,Send users to node,yesno',
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
return _want('ann_talk', @_);
}
+sub wantusers
+{
+ return _want('users', @_);
+}
+
+sub wantsendusers
+{
+ return _want('annsendusers', @_);
+}
+
sub wantlogininfo
{
my $self = shift;
disc4 => 'No Channel or connection but orphan $_[0] disconnected',
done => 'Done',
dup => 'Sorry, this is a duplicate',
+ dupspot => 'Sorry, this is a duplicate (wait a minute and try again)',
dx1 => 'Frequency $_[0] not in band (see show/band); usage: DX [BY call] freq call comments',
dx2 => 'Need a callsign; usage: DX [BY call] freq call comments',
dx3 => 'The callsign or frequency is invalid',