The point of this is to make it easier to maintain both branches.
DXProt (DXProtHandle has already been copied) route/* DXChannel
DXCommandmode and console.pl have been either copied wholesale,
where necessary, modified to use the old Msg based networking stack.
Traditionally, a command is a piece of perl that is a simple
in line lump of code e.g (blank.pl):
my ($self, $line) = @_;
my $lines = 1;
my $data = ' ';
my @f = split /\s+/, $line;
if (@f && $f[0] !~ /^\d+$/) {
$data = shift @f;
$data = $data x int(($self->width-1) / length($data));
$data .= substr $data, 0, int(($self->width-1) % length($data))
}
if (@f && $f[0] =~ /^\d+$/) {
$lines = shift @f;
$lines = 9 if $lines > 9;
$lines = 1 if $lines < 1;
}
my @out;
push @out, $data for (1..$lines);
return (1, @out);
It is now possible to have a 'handler' and any other code you like in
a command file, for instance (again blank.pl):
sub this {}
sub that {}
sub another {}
sub handle
{
my ($self, $line) = @_;
my $lines = 1;
my $data = ' ';
my @f = split /\s+/, $line;
if (@f && $f[0] !~ /^\d+$/) {
$data = shift @f;
$data = $data x int(($self->width-1) / length($data));
$data .= substr $data, 0, int(($self->width-1) % length($data))
}
if (@f && $f[0] =~ /^\d+$/) {
$lines = shift @f;
$lines = 9 if $lines > 9;
$lines = 1 if $lines < 1;
}
my @out;
push @out, $data for (1..$lines);
return (1, @out);
}
The 'sub handle' being the cue that distiguishes one form from the other.
The first form has the 'sub handle { <code> }' wrapped around it so, internally
they are treated the same. Each command is placed in its own DXCommandmode sub
package with a standard set of packages "use"d in front of it.
For now (at least) any functions you declare are just that. "$self" is a DXCommandmode
not a blessed reference to this command's full package name, you cannot use things like
$self->this() or $self->that()
they must be called as local functions.
This may change in the future.
Conflicts:
perl/DXChannel.pm
perl/Version.pm
Added the new K record for keepalives.
Increased the PC92 C interval to 24 hours.
Increased dependent node C interval to 2 hours.
PC50 can reset obs.
PC50 now routed everywhere without filters except isolation,
this may change back in time, when K record is ubiquitous.
Still need to actually issue K record
This is an attempt to cut down on the number PC92Cs that are flying
around. It does this be storing the last PC92C and only sending
it (which should be ignored by other people if broadcast) and
a PC92A. It does mean that the PC92C could be quite out of date
but a fresher will be along soon(ish)
I have also increase the pc92 update time to one hour and
randomised it to one hour - upto 1/4 of the update time.
It will also do each node separately, rather than all together in
one big gob.
call to disconnect an existing connection with the same call. The default for
this variable is 'true' (1). This means that existing behaviour has changed.
set/var $main::bumpexisting = 0 to return to original behaviour.
2. Remind a user every hour (as default) that they have new messages.
set/var $DXCommandmode::msgpolltime = 3*3600 to set it to 3 hours.
3. Allow some substitutions in set/prompt (call, date, time and
cluster call) and add dxspider just before the > as standard.
4. Add $main::allowdxby variable so that sysops can switch off the
'DX BY <othercall' command. It is set to 0 (ie disabled) by default. This
is for sysops who don't want to bump privilege to allow it. That still works
as before.
5. Fix the bug in 'dx by <call>' that causes only the first word of the
comment to be recorded.