SSIDs to -8 as different entities from each other. SSIDs > 8 are subtracted
from 15 and are assumed to be coming in via netrom diddled connections. This
affects lots of the commands as well. I may not have got them all.
+5. Hangup clients on HUP signals. I originally ignored them, for reasons that
+are now lost in the mists of time. HUP signals now cause clients to die
+(cleanly) and disconnect everything correctly.
21Nov99=======================================================================
1. lose extraneous rubbish after the callsign as sent by BBSes.
2. Change end label on sh/moon to RGain dB rather than Loss dB.
3. Remove spurious call to DXCluster->get_exact in pc50.
-4. Allow rcmd to locally connected nodes that are not in the nodes table.
+4. Allow rcmd to locally connected nodes that are not (for some reason) in the
+nodes table.
+5. Try and send a PC39 in more cases to a cluster that I want to disconnect
+from in the hope that it notices and disconnects its end.
20Nov99=======================================================================
1. Added set/unset logininfo which will tell anybody that has this set when
someone has either logged in or out of this node.
Tell the system that the call(s) are to be treated as AK1A cluster and
fed PC Protocol rather normal user commands.
+=== 9^SET/OBSCOUNT <count> <nodecall>^Set the 'pump-up' obscelence counter
+From 1.35 onwards neighbouring nodes are pinged at regular intervals (see
+SET/PINGINTERVAL), usually 300 seconds or 5 minutes. There is a 'pump-up'
+counter which is decremented on every outgoing ping and then reset to
+the 'obscount' value on every incoming ping. The default value of this
+parameter is 2.
+
+What this means is that a neighbouring node will be pinged twice at
+(default) 300 second intervals and if no reply has been heard just before
+what would be the third attempt, that node is disconnected.
+
+If a ping is heard then the obscount is reset to the full value. Using
+default values, if a node has not responded to a ping within 15 minutes,
+it is disconnected.
+
=== 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
explicitly to 0 will disable paging.
SET/PAGE 30
SET/PAGE 0
-
+
+=== 9^SET/PINGINTERVAL <time> <nodecall>^Set ping time to neighbouring nodes
+As from release 1.35 all neighbouring nodes are pinged at regular intervals
+in order to determine the rolling quality of the link and, in future, to
+affect routing decisions. The default interval is 300 secs or 5 minutes.
+
+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
+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.
+
=== 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:-
can contain any characters but any spaces are removed (you can type in
spaces - but they won't appear in the password). You can see the
result with STAT/USER.
-
+
+=== 9^SET/SPIDER <call> [<call>..]^Make the callsign an DXSpider node
+Tell the system that the call(s) are to be treated as DXSpider node and
+fed new style DX Protocol rather normal user commands.
+
=== 9^SET/SYS_QRA <locator>^Set your cluster QRA locator
=== 0^SET/QRA <locator>^Set your QRA locator
Tell the system what your QRA (or Maidenhead) locator is. If you have not
See also TYPE - to see the contents of a file.
+=== 0^SHOW/MOON [<prefix>|<callsign>]^Show Moon rise and set times
+Show the Moon rise and set times for a (list of) prefixes or callsigns,
+together with the azimuth and elevation of the sun currently at those
+locations.
+
+If you don't specify any prefixes or callsigns, it will show the times for
+your QTH (assuming you have set it with either SET/LOCATION or SET/QRA),
+together with the current azimuth and elevation.
+
+In addition, it will show the gain or loss dB relative to the nominal
+distance of 385,000Km due to the ellipsoidal nature of the orbit.
+
+If all else fails it will show the Moonrise and set times for the node
+that you are connected to.
+
+For example:-
+
+ SH/MOON
+ SH/MOON G1TLH W5UN
+
=== 0^SHOW/MUF <prefix> [<hours>][long]^Show the likely propagation to a prefix
This command allow you to estimate the likelihood of you contacting
a station with the prefix you have specified. The output assumes a modest
See also SHOW/DXCC
-=== 0^SHOW/SUN [<callsign>|<prefix>]^Display sunrise and sunset times
-Show the sunrise and sunset times for a callsign (if it is known to the
-cluster), a prefix or, if nothing is specified, at your QTH (if you have
-remembered to set your location using SET/LOCATION or SET/QRA). If all else
-fails it will show the sunrise and set times for the node that you are
-connected to.
-
-You can enter more than one prefix or callsign:-
-
- SH/SUN G1TLH G8TIC W9
-
=== 5^SHOW/PROGRAM^Show the locations of all the included program modules
Show the name and location where every program module was load from. This
is useful for checking where you think you have loaded a .pm file from.
+=== 0^SHOW/SUN [<prefix>|<callsign>]^Show sun rise and set times
+Show the sun rise and set times for a (list of) prefixes or callsigns,
+together with the azimuth and elevation of the sun currently at those
+locations.
+
+If you don't specify any prefixes or callsigns, it will show the times for
+your QTH (assuming you have set it with either SET/LOCATION or SET/QRA),
+together with the current azimuth and elevation.
+
+If all else fails it will show the sunrise and set times for the node
+that you are connected to.
+
+For example:-
+
+ SH/SUN
+ SH/SUN G1TLH K9CW ZS
+
+=== 0^SHOW/TIME [<prefix>|<callsign>]^Show the local time
+If no prefixes or callsigns are given then this command returns the local
+time and UTC as the computer has it right now. If you give some prefixes
+then it will show UTC and UTC + the local offset (not including DST) at
+the prefixes or callsigns that you specify.
+
=== 0^SHOW/WWV^Show last 10 WWV broadcasts
=== 0^SHOW/WWV <n>^Show last <n> WWV broadcasts
Display the most recent WWV information that has been received by the system
--- /dev/null
+#!/usr/bin/perl
+#
+# show local times for each callsign or prefix entered
+#
+# Copyright (c) 1999 Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line;
+
+my $l;
+my @out;
+my $t = $main::systime;
+
+push @out, $self->msg("time1", cldate($t, 1), ztime($t, 1), ztime($t));
+
+if (@list) {
+ foreach $l (@list) {
+ # prefixes --->
+ my @ans = Prefix::extract($l);
+ next if !@ans;
+ my $pre = shift @ans;
+ my $a;
+ foreach $a (@ans) {
+ my $s = sprintf "%-9s %-20s", $pre, $a->name();
+
+ # UTC offset is in hours.minutes (too late to change it now) AND
+ # the wrong way round!
+ my $off = $a->utcoff();
+ my $frac = $off - int $off;
+ $off = (int $off) + (($frac*100)/60);
+ my ($sec,$min,$hour) = gmtime($t - 3600*$off);
+ my $buf = sprintf "%02d%02d", $hour, $min;
+ push @out, $self->msg("time2", $s, $buf, sprintf("%+.1f", -$off));
+ }
+ }
+}
+
+return (1, @out);
sub ztime
{
my $t = shift;
- my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
- $year += 1900;
- my $buf = sprintf "%02d%02dZ", $hour, $min;
+ $t = defined $t ? $t : time;
+ my $dst = shift;
+ my ($sec,$min,$hour) = $dst ? localtime($t): gmtime($t);
+ my $buf = sprintf "%02d%02d%s", $hour, $min, ($dst) ? '' : 'Z';
return $buf;
-
}
# get a cluster format date (23-Jun-1998)
sub cldate
{
my $t = shift;
- my ($sec,$min,$hour,$mday,$mon,$year) = gmtime((defined $t) ? $t : time);
+ $t = defined $t ? $t : time;
+ my $dst = shift;
+ my ($sec,$min,$hour,$mday,$mon,$year) = $dst ? localtime($t) : gmtime($t);
$year += 1900;
my $buf = sprintf "%2d-%s-%04d", $mday, $month[$mon], $year;
return $buf;
sub cldatetime
{
my $t = shift;
- my $date = cldate($t);
- my $time = ztime($t);
+ my $dst = shift;
+ my $date = cldate($t, $dst);
+ my $time = ztime($t, $dst);
return "$date $time";
}
suser2 => 'User $_[0] not found',
suser3 => 'User field \'$_[0]\' was \'$_[1]\' now set to \'$_[2]\'',
suser4 => 'User field name \'$_[0]\' doesn\'t exist',
+ time1 => 'Local Time: $_[0] $_[1], UTC $_[2]',
+ time2 => '$_[0] Local (standard) time: $_[1] ($_[2] Hours)',
talks => 'Talk flag set on $_[0]',
talku => 'Talk flag unset on $_[0]',
usernf => '*** User record for $_[0] not found ***',
cease(0);
}
+# handle callsign and connection type firtling
+sub doclient
+{
+ my $line = shift;
+ my @f = split /\s+/, $line;
+ $call = uc $f[0] if $f[0];
+ $csort = $f[1] if $f[1];
+}
#
# initialisation
alarm(0);
}
-# handle callsign and connection type firtling
-sub doclient
-{
- my $line = shift;
- my @f = split /\s+/, $line;
- $call = uc $f[0] if $f[0];
- $csort = $f[1] if $f[1];
-}
-
# is this an out going connection?
if ($connsort eq "connect") {
my $mcall = lc $call;
$mode = ($connsort eq 'ax25') ? 1 : 2;
setmode();
+# adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
+my ($scall, $ssid) = split /-/, $call;
+$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
+if ($ssid) {
+ $ssid = 15 if $ssid > 15;
+ if ($connsort eq 'ax25') {
+ if ($ssid > 8) {
+ $ssid = 15 - $ssid;
+ }
+ }
+ $call = "$scall-$ssid";
+}
+
+
$conn = Msg->connect("$clusteraddr", $clusterport, \&rec_socket);
if (! $conn) {
if (-r "$data/offline") {
# set up the basic channel info - this needs a bit more thought - there is duplication here
if (!defined $dxchan) {
my ($sort, $call, $line) = $msg =~ /^(\w)(\S+)\|(.*)$/;
- my ($scall, $ssid) = split /-/, $call;
-
- # adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
- if ($ssid) {
- $ssid = 15 if $ssid > 15;
- if ($ssid > 8) {
- $ssid = 15 - $ssid;
- $call = "$scall-$ssid";
- }
- }
# is there one already connected to me - locally?
my $user = DXUser->get($call);
$call = uc shift @ARGV if @ARGV;
$call = uc $myalias if !$call;
+my ($scall, $ssid) = split /-/, $call;
+$ssid = undef unless $ssid && $ssid =~ /^\d+$/;
+if ($ssid) {
+ $ssid = 15 if $ssid > 15;
+ $call = "$scall-$ssid";
+}
if ($call eq $mycall) {
print "You cannot connect as your cluster callsign ($mycall)\n";