+06Jan01=======================================================================
+1. Fix set/obscount so it actually works.
+2. Allow different number formats for set/pingint eg: 5m for 5 minutes and
+120s for 120 seconds (and 1h for 1 hour).
03Jan01=======================================================================
1. Added a txt directory for txt versions of manuals (g0vgs)
2. Various documentation changes
default values, if a node has not responded to a ping within 15 minutes,
it is disconnected.
+You can set this parameter between 1 and 9.
+
+It is STRONGLY recommended that you don't change the default.
+
=== 0^SET/PAGE <lines per page>^Set the lines per page
Tell the system how many lines you wish on a page when the number of line
of output from a command is more than this. The default is 20. Setting it
You can use this command to set a different interval. Please don't.
-But if you do the value you enter is treated as minutes up 60 and seconds
+But if you do the value you enter is treated as minutes up 30 and seconds
for numbers greater than that.
This is used also to help determine when a link is down at the far end
(as certain cluster software doesn't always notice), see SET/OBSCOUNT
for more information.
+If you must change it (and it may be useful for internet connected nodes
+on dynamic IP addresses that go away after a set time of usage) the time
+can be specified as:-
+
+ 5 which if less than 30 is converted to minutes otherwise is
+ taken as the no of seconds between pings.
+ 120s 120 seconds
+ 5m 5 minutes
+ 1h 1 hour
+
+Please be aware that this causes traffic to occur on the link, setting
+this value too low may annoy your neighbours beyond the point of
+endurance!
+
+You can switch this off by setting it to 0.
+
=== 9^SET/PRIVILEGE <n> <call> [<call..]^Set privilege level on a call
Set the privilege level on a callsign. The privilege levels that pertain
to commands are as default:-
my $call;
my @out;
my $user;
-my $val = int shift @args if @args;
+my $val = shift @args if @args;
return (1, $self->msg('e5')) if $self->priv < 8;
-return (1, $self->msg('e14')) unless defined $val;
+return (1, $self->msg('e25', 1, 9)) unless defined $val && $val =~ /^\d+$/ && $val >= 1 && $val <= 9;
return (1, $self->msg('e12')) unless @args;
-$val *= 60 if $val < 120;
-
foreach $call (@args) {
$call = uc $call;
+ my $dxchan = DXChannel->get($call);
+ $user = $dxchan->user if $dxchan;
$user = DXUser->get_current($call);
if ($user) {
- unless ($user->sort eq 'A' || $user->sort eq 'S') {
+ unless ($user->is_node) {
push @out, $self->msg('e13', $call);
next;
}
- $user->pingint($val);
+ $user->nopings($val);
if ($dxchan) {
- $dxchan->pingint($val);
+ $dxchan->nopings($val);
} else {
$user->close();
}
- push @out, $self->msg('pingint', $call, $val);
+ push @out, $self->msg('obscount', $call, $val);
} else {
- push @out, $self->msg('e3', "Set/Pinginterval", $call);
+ push @out, $self->msg('e3', "set/obscount", $call);
}
}
return (1, @out);
my $call;
my @out;
my $user;
-my $val = int shift @args if @args;
+my $val = shift @args if @args;
-return (1, $self->msg('e5')) if $self->priv < 9;
+return (1, $self->msg('e5')) if $self->priv < 8;
return (1, $self->msg('e14')) unless defined $val;
return (1, $self->msg('e12')) unless @args;
-$val *= 60 if $val < 120;
+if ($val =~ /^(\d+)[sS]$/) {
+ $val = $1;
+} elsif ($val =~ /^(\d+)[mM]$/) {
+ $val = $1 * 60;
+} elsif ($val =~ /^(\d+)[hH]$/) {
+ $val = $1 * 60 * 60;
+} elsif ($val =~ /^\d+$/) {
+ $val *= 60 if $val < 30;
+} else {
+ return (1, $self->msg('e14'));
+}
foreach $call (@args) {
$call = uc $call;
$user = $dxchan->user if $dxchan;
$user = DXUser->get($call) unless $user;
if ($user) {
- unless ($user->sort eq 'A' || $user->sort eq 'S') {
+ unless ($user->is_node) {
push @out, $self->msg('e13', $call);
next;
}
$dxchan->send($dxchan->msg('pingi', $field[2], $s, $ave))
} elsif ($dxchan->is_node) {
if ($tochan) {
- $tochan->{nopings} = 2; # pump up the timer
+ $tochan->{nopings} = $tochan->user->nopings || 2; # pump up the timer
push @{$tochan->{pingtime}}, $t;
shift @{$tochan->{pingtime}} if @{$tochan->{pingtime}} > 6;
my $st;
e22 => '$_[0] not a callsign',
e23 => '$_[0] not a range (eg 0/30000)',
e24 => 'Sorry, Internet access is not enabled',
+ e25 => 'Sorry the value must be between $_[0] and $_[1]',
echoon => 'Echoing enabled',
echooff => 'Echoing disabled',
nodexc => '$_[0] created as DXNET style Node',
nodeu => '$_[0] set back as a User',
nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line',
+ obscount => 'Ping obsolescence count on $_[0] set to $_[1]',
ok => 'Operation successful',
outconn => 'Outstanding connect to $_[0]',
page => 'Press Enter to continue, A to abort ($_[0] lines) >',