1. Fixed problems with sh/rcmd (talk/ann/log) with a callsign as argument and
authordjk <djk>
Sun, 20 Dec 1998 01:58:04 +0000 (01:58 +0000)
committerdjk <djk>
Sun, 20 Dec 1998 01:58:04 +0000 (01:58 +0000)
also made what G0RDI wanted work as well!
2. Added isolate flag to allow isolation of different networks at a gateway.
3. Changed make Makefile.PL to perl Makefile.PL in instructions
4. Copied latest instructions to html directory
5. Had another attempt at making clients disconnect without hanging everytime.
6. Changed msg queuing semantics so that the system routes on exact callsign.
7. Changed the protocol version so that it increments with the DXSpider version.

23 files changed:
Changes
cmd/Commands_en.hlp
cmd/create/node.pl [deleted file]
cmd/create/user.pl [deleted file]
cmd/delete/node.pl [deleted file]
cmd/show/announce.pl
cmd/show/log.pl
cmd/show/rcmd.pl
cmd/show/talk.pl
connect/gb7tlh
html/connect.html
html/cpan.html
html/index.html
html/install.html
perl/DXChannel.pm
perl/DXLogPrint.pm
perl/DXMsg.pm
perl/DXProt.pm
perl/DXProtVars.pm
perl/DXProtout.pm
perl/DXUser.pm
perl/DXUtil.pm
perl/cluster.pl

diff --git a/Changes b/Changes
index d8b126bdbb85c0c8ba08fa3e6deed14cc065f626..35fa1d845c122d99f52df240a6f013c5658e45a1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+19Dec98========================================================================
+1. Fixed problems with sh/rcmd (talk/ann/log) with a callsign as argument and
+also made what G0RDI wanted work as well!
+2. Added isolate flag to allow isolation of different networks at a gateway.
+3. Changed make Makefile.PL to perl Makefile.PL in instructions
+4. Copied latest instructions to html directory
+5. Had another attempt at making clients disconnect without hanging everytime.
+6. Changed msg queuing semantics so that the system routes on exact callsign.
+7. Changed the protocol version so that it increments with the DXSpider version.
 14Dec98========================================================================
 1. Made the telnet thing work a bit better. It still will not work reliably to
 a real telnetd on port 23.
index 48b2704d860c6bb0b3f2f1bc42dd855e55cbbad1..80f2765ae7df98cf70a0f18f0feb08f7cb566a6c 100644 (file)
@@ -139,6 +139,13 @@ this command. You can remove more than one message at a time.
 === 5^KILL-^
 As a sysop you can kill any message on the system.
 
+=== 8^PC <call> <text>^Send arbitrary text to a connected callsign
+Send any text you like to the callsign requested. This is used mainly to send
+PC protocol to connected nodes either for testing or to unstick things. 
+
+You can also use in the same way as a talk command to a connected user but
+without any processing, added of "from <blah> to <blah" or whatever.
 === 1^PING <node call>^Find out the delays an a circuit to another node
 This command will enable sysops to determine the speed of an inter-cluster
 node. 
@@ -220,6 +227,16 @@ to you will normally find their way there should you not be connected.
 eg:-
   SET/HOMENODE gb7djk
 
+=== 9^SET/ISOLATE^Isolate a node from the rest of the network
+Connect a node to your system in such a way that you are a full protocol
+member of its network and can see all spots on it, but nothing either leaks
+out from it nor goes back into from the rest of the nodes connected to you.
+
+You can potentially connect several nodes in this way.
+=== 9^UNSET/ISOLATE^Stop Isolation of a node from the rest of the network
+Remove isolation from a node - SET/ISOLATE
+
 === 0^SET/LOCATION <lat & long>^Set your latitude and longitude
 In order to get accurate headings and such like you must tell the system
 what your latitude and longitude is. If you have not yet done a SET/QRA
@@ -329,6 +346,18 @@ Display the most recent WWV information that has been received by the system
 === 5^SHUTDOWN^Shutdown the cluster
 Shutdown the cluster and disconnect all the users 
 
+=== 5^STAT/CHANNEL [<callsign>]^Show the status of a channel on the cluster
+Show the internal status of the channel object either for the channel that 
+you are on or else for the callsign that you asked for.
+
+Only the fields that are defined (in perl term) will be displayed.
+
+=== 5^STAT/USER [<callsign>]^Show the full status of a user
+Shows the full contents of a user record including all the secret flags
+and stuff.
+
+Only the fields that are defined (in perl term) will be displayed.
+
 === 0^TALK <call> <text>^Send a text message to another station
 === 0^TALK <call> > <node> <text>^Send a text message to another station via a node
 Send a short message to any other station that is visible on the cluster
@@ -337,9 +366,9 @@ command, they don't have to be connected locally.
 
 The second form of TALK is used when other cluster nodes are connected
 with restricted information. This usually means that they don't send 
-the user information usually associated with loging on and off the cluster.
+the user information usually associated with logging on and off the cluster.
 
-If you know that G3JNB is likly to be present on GB7TLH, but you can only
+If you know that G3JNB is likely to be present on GB7TLH, but you can only
 see GB7TLH in the SH/C list but with no users, then you would use the
 second form of the talk message.
 
diff --git a/cmd/create/node.pl b/cmd/create/node.pl
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/cmd/create/user.pl b/cmd/create/user.pl
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/cmd/delete/node.pl b/cmd/delete/node.pl
deleted file mode 100644 (file)
index e69de29..0000000
index 89d8719239caaf36ec360f51b652a6b4660b3b33..71b046d0cdf483aa5df7792ed4e3b1426ec220db 100644 (file)
@@ -13,7 +13,7 @@ my $cmdline = shift;
 my @f = split /\s+/, $cmdline;
 my $f;
 my @out;
-my ($from, $to); 
+my ($from, $to, $who); 
 
 $from = 0;
 while ($f = shift @f) {                 # next field
@@ -26,9 +26,12 @@ while ($f = shift @f) {                 # next field
                ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
                next if $to;
        }
+       next if $who;
+       ($who) = $f =~ /^(\w+)/o;
 }
 
-$to = 20 if !$to;
+$to = 20 unless $to;
+$from = 0 unless $from;
 
-@out = DXLog::print($from, $to, $main::systime, '^ann');
+@out = DXLog::print($from, $to, $main::systime, '^ann', $who);
 return (1, @out);
index 63326b7ba80903b2710c91adccd1c7ef672ae980..106bfd47b9816bdb75f36108710dcdd0bdd4c753 100644 (file)
@@ -13,7 +13,7 @@ my $cmdline = shift;
 my @f = split /\s+/, $cmdline;
 my $f;
 my @out;
-my ($from, $to); 
+my ($from, $to, $who); 
 
 $from = 0;
 while ($f = shift @f) {                 # next field
@@ -26,9 +26,12 @@ while ($f = shift @f) {                 # next field
                ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
                next if $to;
        }
+       next if $who;
+       ($who) = $f =~ /^(\w+)/o;
 }
 
-$to = 20 if !$to;
+$to = 20 unless $to;
+$from = 0 unless $from;
 
-@out = DXLog::print($from, $to, $main::systime);
+@out = DXLog::print($from, $to, $main::systime, undef,  $who);
 return (1, @out);
index deff4d33f283c631c2bddf3859eb4ded8204b723..bc3a71f95590e8a239d03e0ba75f7af6d088781f 100644 (file)
@@ -13,7 +13,7 @@ my $cmdline = shift;
 my @f = split /\s+/, $cmdline;
 my $f;
 my @out;
-my ($from, $to); 
+my ($from, $to, $who); 
 
 $from = 0;
 while ($f = shift @f) {                 # next field
@@ -26,9 +26,12 @@ while ($f = shift @f) {                 # next field
                ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
                next if $to;
        }
+       next if $who;
+       ($who) = $f =~ /^(\w+)/o;
 }
 
-$to = 20 if !$to;
+$to = 20 unless $to;
+$from = 0 unless $from;
 
-@out = DXLog::print($from, $to, $main::systime, '^rcmd');
+@out = DXLog::print($from, $to, $main::systime, '^rcmd', $who);
 return (1, @out);
index 612f2b089358bebda4c03095677a49de616b90ed..f30d95ec57e9676e29f87cfdb772d242b70fe82e 100644 (file)
@@ -13,7 +13,7 @@ my $cmdline = shift;
 my @f = split /\s+/, $cmdline;
 my $f;
 my @out;
-my ($from, $to); 
+my ($from, $to, $who); 
 
 $from = 0;
 while ($f = shift @f) {                 # next field
@@ -26,9 +26,12 @@ while ($f = shift @f) {                 # next field
                ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
                next if $to;
        }
+       next if $who;
+       ($who) = $f =~ /^(\w+)/o;
 }
 
-$to = 20 if !$to;
+$to = 20 unless $to;
+$from = 0 unless $from;
 
-@out = DXLog::print($from, $to, $main::systime, '^talk');
+@out = DXLog::print($from, $to, $main::systime, '^talk', $who);
 return (1, @out);
index a2834ab494662ce3c1d0cb9804770897a6a74a4e..3918effc6dbf4073f13efba7ccd8a623140ff4c2 100644 (file)
@@ -1,11 +1,7 @@
 timeout 15
-# don't forget to chmod 4775 netrom_call!
-#connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
-#'Connect' ''
-#'Connect' 'cluster'
-#'Connect'
-#client gb7tlh ax25
-connect telnet dirk1
-'login' 'djk'
-'word' 'b390vpw'
-'last'
+ don't forget to chmod 4775 netrom_call!
+connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh-0
+'Connect' ''
+'Connect' 'cluster'
+'Connect'
+client gb7tlh ax25
index ebc9ce88e3624f89f02652e42622cb3720d64911..cb349e6ccefaabd04e77b04fe2b50a823d34f1c7 100644 (file)
@@ -2,25 +2,32 @@
 <html>
   <head>
     <title>Connecting to other Clusters</title>
+       <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
+       <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
+       <meta name="Author" content="Dirk Koopman G1TLH">
   </head>
 
-  <body>
-    <h2>Connecting to other Clusters</h2>
-
-    <hr>
-    <address><a href="mailto:djk@tobit.co.uk">Dirk Koopman G1TLH</a></address>
+  <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
+       <FONT COLOR="#606060"> 
+         <hr>
+         <h2>Connecting to other Clusters</h2>
+         <hr>
+       </font>
+       
+       
+       <address><a href="mailto:djk@tobit.co.uk">Dirk Koopman G1TLH</a></address>
        <p>
-<!-- Created: Sun Dec 13 20:25:14 GMT 1998 -->
-<!-- hhmts start -->
-Last modified: Mon Dec 14 00:29:00 GMT 1998
+         <!-- Created: Sun Dec 13 20:25:14 GMT 1998 -->
+         <!-- hhmts start -->
+Last modified: Thu Dec 17 00:06:40 GMT 1998
 <!-- hhmts end -->
        <p>At the moment, anybody can connect inwards at any time from outside, either by ax25 or by
          telnet (assuming you have followed the instructions in <a href="install.html">installation</a>
          instructions. However, in order to connect outwards, you will need to create <em>connect</em> scripts.
-
+         
        <p><em>Connect</em> scripts live in the <tt>/spider/connect</tt> directory and are simple ascii scripts
          that are written using a normal editor. There are a couple of examples in the issue directory.
-
+         
        <p>Here are a couple of basic types, first a telnet connection:-
        <pre>
     timeout 15
@@ -28,7 +35,7 @@ Last modified: Mon Dec 14 00:29:00 GMT 1998
     connect telnet dirkl.tobit.co.uk
     'login' 'gb7djk'
     'word' 'gb7djk'
-    client /usr/bin/perl /spider/perl/client.pl gb7djk-1 telnet
+    client gb7djk-1 telnet
        </pre>
        <p>and an ax25 example:-
        <pre>
@@ -40,17 +47,17 @@ Last modified: Mon Dec 14 00:29:00 GMT 1998
     'Connect' 'c np7'
     'Connect' 'c gb7dxm'
     'Connect' ''
-    client /usr/bin/perl /spider/perl/client.pl gb7dxm ax25
+    client gb7dxm ax25
        </pre>
-
+       
        <p>A connection is started manually by typing in <tt>connect <scriptname></tt> on a sysop enabled
          <tt>client.pl</tt> session. For example:-
        <pre>
     G1TLH de GB7DJK 13-Dec-1998 2041Z > connect gb7djk-1
     connection to GB7DJK-1 started
     G1TLH de GB7DJK 13-Dec-1998 2043Z > 
-    </pre>
-    
+       </pre>
+       
     <p>You can watch the progress of the connection (if you have the standard debugging enabled) on the
          <tt>cluster.pl</tt> screen and you should see something like this:-
        <pre>
@@ -81,8 +88,8 @@ Last modified: Mon Dec 14 00:29:00 GMT 1998
     &lt;- D GB7DJK-1 PC38^GB7DJK-1^~
     &lt;- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users  Max users 0  Uptime 0 00:00^5447^~
     etc
-    </pre>
-
+       </pre>
+       
        <p>The connect scripts consist of lines which start with the following keywords or symbols:-
        <ul>
                <p><li><b>#</b> All lines starting with a <b>#</b> are ignored, as are wholly blank lines.
@@ -104,10 +111,19 @@ Last modified: Mon Dec 14 00:29:00 GMT 1998
                <p>When the left hand string has found what it is looking (if it is) then the right hand string is
                  sent to the connection. 
                <p>This process is repeated for every line of <tt>chat</tt> script. 
-               <p><li><b>client</b> starts the client program and should be exactly as you would want it with an incoming
-               connection.
+               <p><li><b>client</b> starts the connection, put the arguments you would want here if you were
+               starting the client program manually. You only need this if the script has a different name to
+               the callsign you are trying to connect to (i.e. you have a script called <tt>other</tt> which actually
+               connects to <tt>GB7DJK-1</tt> [instead of a script called <tt>gb7djk-1</tt>]).
        </ul>
-    <hr>
-       <h5>$Id$</h5>
+
+<!-- Standard Footer!! -->
+       <p>&nbsp;</p>
+       <p>
+         <FONT COLOR="#606060"><hr></font>
+       <font color="#FF0000" size=-2>
+         Copyright &copy; 1998 by Dirk Koopman G1TLH. All Rights Reserved<br>
+       </font>
+       <font color="#000000" size=-2>$Id$</font>
   </body>
 </html>
index e6f46c6a46d7631bb6b7d1459217366100eb918b..9e9a00641b8215ec97cdf74282af33797512692e 100644 (file)
@@ -1,15 +1,23 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
   <head>
-       <title>CPAN and perl installation</title>
+    <title>Installing CPAN</title>
+       <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
+       <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
+       <meta name="Author" content="Dirk Koopman G1TLH">
   </head>
-  <body>
-       <h2>CPAN and perl installation</h2>
-    <hr>
-    <address><a href="mailto:djk@tobit.co.uk"></a></address>
-<!-- Created: Wed Dec  2 16:40:25 GMT 1998 -->
-<!-- hhmts start -->
-Last modified: Wed Dec  2 19:46:03 GMT 1998
+
+  <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
+       <FONT COLOR="#606060" face="Verdana,Helvetica,Swiss,Arial"> 
+         <hr>
+         <h2>Installing CPAN</h2>
+         <hr>
+       </font>
+
+       <address><a href="mailto:djk@tobit.co.uk"></a>Dirk Koopman G1TLH</address>
+       <p>
+       <!-- Created: Wed Dec  2 18:22:33 GMT 1998 -->
+       <!-- hhmts start -->
+Last modified: Thu Dec 17 00:06:40 GMT 1998
 <!-- hhmts end -->
 
        <p>I have captured a typical CPAN load here for your information. The details may be slightly
@@ -797,7 +805,13 @@ Appending installation info to /usr/lib/perl5/i386-linux/5.00404/perllocal.pod
 cpan> q
 Lockfile removed.
        </pre>
-       <hr>
-       <h5>Version: $Id$</h5>
+<!-- Standard Footer!! -->
+       <p>&nbsp;</p>
+       <p>
+         <FONT COLOR="#606060"><hr></font>
+       <font color="#FF0000" size=-2>
+         Copyright &copy; 1998 by Dirk Koopman G1TLH. All Rights Reserved<br>
+       </font>
+       <font color="#000000" size=-2>$Id$</font>
   </body>
 </html>
index adfa769a86eb1fbd7100843e02f07652bde76e68..e3a7374320a248fb7c3f52f57ecea23d90ef89f7 100644 (file)
@@ -2,16 +2,23 @@
 <html>
   <head>
     <title>DXSpider</title>
+       <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
+       <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
+       <meta name="Author" content="Dirk Koopman G1TLH">
   </head>
 
-  <body>
-    <h2>DXSpider</h2>
+  <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
+       <FONT COLOR="#606060" face="Verdana,Helvetica,Swiss,Arial"> 
+         <hr>
+         <h2>DXSpider</h2>
+         <hr>
+       </font>
 
-    <hr>
-    <address><a href="mailto:djk@tobit.co.uk"></a></address>
-<!-- Created: Wed Dec  2 18:22:33 GMT 1998 -->
-<!-- hhmts start -->
-Last modified: Sun Dec 13 22:29:57 GMT 1998
+       <address><a href="mailto:djk@tobit.co.uk"></a>Dirk Koopman G1TLH</address>
+       <p>
+       <!-- Created: Wed Dec  2 18:22:33 GMT 1998 -->
+       <!-- hhmts start -->
+Last modified: Thu Dec 17 00:06:39 GMT 1998
 <!-- hhmts end -->
        <p>The DXSpider dx cluster system is written in perl5 as an exercise in self-training
          for both protocol research and teaching myself perl.
@@ -22,6 +29,16 @@ Last modified: Sun Dec 13 22:29:57 GMT 1998
          <li> <a href="install.html">Installation</a> of the main cluster software.
          <li> Installing the lastest version of <a href="cpan.html">CPAN</a>.
          <li> <a href="connect.html">Connecting</a> to other clusters.
-    </ol>
+         <li> <a href="../download/">Download</a> the software and any patches.
+         </ol>
+
+<!-- Standard Footer!! -->
+       <p>&nbsp;</p>
+       <p>
+         <FONT COLOR="#606060"><hr></font>
+       <font color="#FF0000" size=-2>
+         Copyright &copy; 1998 by Dirk Koopman G1TLH. All Rights Reserved<br>
+       </font>
+       <font color="#000000" size=-2>$Id$</font>
   </body>
 </html>
index b375941ef08cfae9629bc1d2a2652c9ca09f2e25..74c432ce4bf80c7bce1c4df118da682a4d353bb1 100644 (file)
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <HTML>
-<HEAD>
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
-<META NAME="Generator" CONTENT="Microsoft Word 97">
-<TITLE>Spider-HOWTO</TITLE>
-<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
-</HEAD>
-<BODY LINK="#0000ff" VLINK="#800080">
-
-<P><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"></P>
-<H2>Installing DX Spider on RedHat 5.1</H2>
-<P><HR></P>
-<P><A HREF="mailto:ip@g8sjp.demon.co.uk">Iain Phillips G0RDI</A></P>
-<P>
+  <HEAD>
+       <TITLE>DX Spider Installation</TITLE>
+       <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
+       <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
+       <meta name="Author" content="Dirk Koopman G1TLH">
+  </HEAD>
+
+  <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
+       <FONT COLOR="#606060" face="Verdana,Helvetica,Swiss,Arial"> 
+         <hr>
+         <h2>Installing DX Spider (on Redhat 5.1)</h2>
+         <hr>
+       </font>
+
+       <address><A HREF="mailto:ip@g8sjp.demon.co.uk">Iain Phillips G0RDI</A></address>
 <!-- Created: Wed Dec  2 16:40:25 GMT 1998 -->
 <!-- hhmts start -->
-Last modified: Mon Dec 14 00:01:40 GMT 1998
-<!-- hhmts end --></P>
-<P>This HOWTO describes the installation for DX Spider v1.11 on a "vanilla" Red Hat 5.1 platform, and assumes that you have started with a clean disk, with nothing other than the standard Red Hat 5.1 distribution. I always select 'everything', and that seems to ensure that nothing is missed out :-) </P>
-<P>In addition to the standard Red Hat distribution you will require the following <A HREF="http://www.cpan.org/CPAN.html">CPAN</A> modules: -</P><DIR>
-<DIR>
-
-<P>MD5-1.7.tar.gz <BR>
-Data-Dumper-2.10.tar.gz <BR>
-FreezeThaw-0.3.tar.gz <BR>
-MLDBM-2.00.ar.gz <BR>
-TimeDate-1.8.tar.gz <BR>
-IO-1.20.tar.tgz <BR>
-Net-Telnet-3.01.tar.gz<BR>
-&nbsp; </P></DIR>
-</DIR>
-<p><em>Do</em> get the latest versions of these packages if any of the above list
-is out of date.
-
-<P>You'll also need the AX25 utility package. There is much debate about what is "best", what is "better". What works for 5.1 is this: -</P><DIR>
-<DIR>
-
-<P>ax25-utils-2.1.42a-1.i386.rpm</P></DIR>
-</DIR>
-
-<P>This can be found at (among other places) <A HREF="ftp://contrib.redhat.com/libc6">ftp://contrib.redhat.com</A>. Note that no attempt is made within this document to describe the steps necessary to install and commission the AX25 kernel package. It remains the responsibility of the reader to have sufficient knowledge and expertise to make this part of the system operation (and to be satisfied that it <B><I>is </B></I>operational) before attempting to install DX Spider. Read the AX25-HOWTO and ask around if you
- still have trouble after that.</P>
-<P>The last "must have" is the DX Spider distribution itself, and this is available via: -</P><DIR>
-<DIR>
-
-<P><A HREF="http://www.dxcluster.org/">http://www.dxcluster.org</A></P>
-<P>&nbsp;</P></DIR>
-</DIR>
-
-<OL>
-
-<LI>Copy the CPAN modules listed above to a convenient place on your computer. For no good reason, I put mine in /usr/local/packages, and the instructions which follow will assume that that's where yours are, too.</LI>
-<P>Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: -</P>
-<PRE># tar xvfz /usr/local/packages/MD5-1.7.tar.gz
+Last modified: Sat Dec 19 16:10:14 GMT 1998
+<!-- hhmts end -->
+       <P>This HOWTO describes the installation for DX Spider v1.11 on a "vanilla" 
+         <A href="http://www.redhat.com">RedHat</A> 5.1 platform, 
+         and assumes that you have started with a clean disk, with nothing other than the standard 
+         Red Hat 5.1 distribution. I always select 'everything', and that seems to ensure that 
+         nothing is missed out :-) [ more normal people may like to try with less <em>Ed</em> ].
+
+       <p>The crucial ingredient for all of this is <a href="http://www.perl.org">Perl 5.004</a>. Now I know
+         Perl 5.005 is out and this will almost certainly work with it, but 
+         <A Href="http://www.redhat.com">RedHat</A> 5.1 comes with 5.004. 
+         <em>Be Warned</em> earlier versions of <A Href="http://www.redhat.com">RedHat</A> 
+         <b>do not</b> come with 5.004 as standard, you need to 
+         <a href="ftp://upgrade.redhat.com">upgrade</a>
+
+       <P>In addition to the standard Red Hat distribution you will require the following <A HREF="http://www.cpan.org/CPAN.html">CPAN</A> modules: -
+       <p>
+       <dir>
+               MD5-1.7.tar.gz <BR>
+               Data-Dumper-2.10.tar.gz <BR>
+               FreezeThaw-0.3.tar.gz <BR>
+               MLDBM-2.00.ar.gz <BR>
+               TimeDate-1.8.tar.gz <BR>
+               IO-1.20.tar.tgz <BR>
+               Net-Telnet-3.01.tar.gz<BR>
+               &nbsp;
+       </DIR>
+
+       <p><em>Do</em> get the latest versions of these packages if any of the above list
+         is out of date.
+
+       <P>You'll also need the AX25 utility package. There is much debate about what is "best", what is "better". What works for 5.1 is this: -
+       <p>
+       <DIR>
+               ax25-utils-2.1.42a-1.i386.rpm
+       </DIR>
+       
+       <P>This can be found at (among other places) <A HREF="ftp://contrib.redhat.com/libc6">ftp://contrib.redhat.com</A>. Note that no attempt is made within this document to describe the steps necessary to install and commission the AX25 kernel package. It remains the responsibility of the reader to have sufficient knowledge and expertise to make this part of the system operation (and to be satisfied that it <B><I>is </B></I>operational) before attempting to install DX Spider. Read the AX25-HOWTO and ask around if you
+ still have trouble after that.
+
+       <P>The last "must have" is the DX Spider distribution itself, and this is available via: -
+
+       <p>
+       <DIR>
+               <A HREF="../download/index.html">The DX Spider Software</A>
+       </DIR>
+
+       <p>We can now begin:-
+       <P>
+       <OL>
+         
+         <p><LI>Copy the CPAN modules listed above to a convenient place on your computer. For no good reason, I put mine in /usr/local/packages, and the instructions which follow will assume that that's where yours are, too.
+               <P>Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: -
+               <PRE>
+# tar xvfz /usr/local/packages/MD5-1.7.tar.gz
 # cd MD5-1.7
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
 # tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz
 # cd Data-Dumper-2.10
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
 # tar xvfz /usr/local/packages/FreezeThaw-0.3.tar.gz
 # cd FreezeThaw-0.3
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
 # tar xvfz /usr/local/packages/MLDBM-2.00.tar.gz
 # cd MLDBM-2.00
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
 # tar xvfz /usr/local/packages/TimeDate-1.08.tar.gz
 # cd TimeDate-1.08
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
 # tar xvfz /usr/local/packages/IO-1.20.tar.gz
 # cd IO-1.20
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install UNINST=1
 # cd ..
 #
 # tar xvfz /usr/local/packages/Net-Telnet-3.01.tar.gz
 # cd Net-Telnet-3.01.tar.gz
-# make Makefile.PL
+# perl Makefile.PL
 # make test
 # make install
 # cd ..
 #
-</pre>
-<P>Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.</P>
-<LI>Create a user to run the cluster under. <B><I><U>UNDER NO CIRCUMSTANCES USE ROOT</LI>
-</B></I></U><P>Again: <B><I><U>DO NOT USE</B></I></U> root.</P>
-<P>In the instructions which follow, it is assumed that this user is called 'sysop'. You may call it anything you wish. Depending upon your security requirements, you may choose to use an existing user. This will be your choice, not ours!</P>
-<P># adduser -m sysop</P>
-<P>Now set a password for the user:-</P>
-<PRE>#
+               </pre>
+               <P>Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.
+
+               <p><LI>Create a user to run the cluster under. <B><I><U>UNDER NO CIRCUMSTANCES USE ROOT
+               </B></I></U><P>Again: <B><I><U>DO NOT USE</B></I></U> root.
+               <P>In the instructions which follow, it is assumed that this user is called 'sysop'. You may call it anything you wish. Depending upon your security requirements, you may choose to use an existing user. This will be your choice, not ours!
+               <P># adduser -m sysop
+               <P>Now set a password for the user:-
+               <PRE>
+#
 # passwd sysop
 # New UNIX password:
 # Retype new UNIX password:
-passwd: all authentication tokens updated successfully</PRE>
-<P># Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.</P>
-<LI>Now unpack the DX Spider distribution, set symbolic links and group permissions like this (assumes that the version we're interested in is 1.9. The distribution tar file may be named slightly differently in your case: -</LI>
-<PRE># cd ~sysop
+passwd: all authentication tokens updated successfully
+               </PRE>
+               <P># Do not fall into the trap of thinking they're all the same, just because they nearly are! Pay particular attention to the instructions of IO, above.
+               
+               <p><LI>Now unpack the DX Spider distribution, set symbolic links and group permissions like this (assumes that the version we're interested in is 1.9. The distribution tar file may be named slightly differently in your case: -
+               <PRE>
+# cd ~sysop
 # tar xvfz spider-1.9.tar.gz
 # ln -s ~sysop/spider /spider
 # groupadd -g 251 spider       (or another number)
 # vi /etc/group                (or your favorite editor)
-</PRE>
-<P>add 'sysop', your own callsign (in my case 'g0rdi' - which will be used as an alias) and 'root' to the group spider. The result should look something like:-</P>
-<PRE>spider:x:251:sysop,g0rdi,root</PRE>
-<LI>Next step is to set permissions on the 'spider' directory tree and files:-</LI>
-<PRE># chown -R sysop.spider spider
+               </PRE>
+               <P>add 'sysop', your own callsign (in my case 'g0rdi' - which will be used as an alias) and 'root' to the group spider. The result should look something like:-
+               <PRE>
+spider:x:251:sysop,g0rdi,root
+               </PRE>
+
+               <p><LI>Next step is to set permissions on the 'spider' directory tree and files:-
+               <PRE>
+# chown -R sysop.spider spider
 # find . -type d -exec chmod 2775 {} \;
 # find . -type f -exec chmod 775 {} \;
-</PRE>
-<P>This last step allows various users of group spider to have write access to all the directories. Not really needed for now but will be useful when web interfaces start to appear.</P>
-<LI>Should you have any users that require network logins, set them up as real users with 'useradd -m &lt;callsign&gt;'. Alter the default .bashrc so that it contains just one line (assuming you use the default bash shell). </LI>
-<PRE>
+               </PRE>
+               <P>This last step allows various users of group spider to have write access to all the directories. Not really needed for now but will be useful when web interfaces start to appear.
+               
+               <p><LI>Should you have any users that require network logins, set them up as real users with 'useradd -m &lt;callsign&gt;'. Alter the default .bashrc so that it contains just one line (assuming you use the default bash shell). 
+               <PRE>
 exec /spider/perl/client.pl &lt;callsign&gt; telnet
-</PRE>
-<p>Alternatively you can set up a real login for a person (or another cluster) by creating a login using:-
-<pre>
+               </PRE>
+               <p>Alternatively you can set up a real login for a person (or another cluster) by creating a login using:-
+               <pre>
 # useradd gb7djk
 # passwd gb7djk
 New UNIX password: 
 Retype new UNIX password: 
 passwd: all authentication tokens updated successfully
-</pre>
-<p>and editing the <tt>/etc/passwd</tt> file to look like this (do substitute the correct callsigns here ;-):-
-<pre>
+               </pre>
+               <p>and editing the <tt>/etc/passwd</tt> file to look like this (do substitute the correct callsigns here ;-):-
+               <pre>
 fbb:x:505:505::/home/fbb:/bin/bash
 gb7djk:x:506:506::/home/gb7djk:/usr/bin/perl /spider/perl/client.pl gb7djk telnet
-</pre>
-<P>Don't forget to give them a real password. This is really for network cluster logins. The telnet argument does two things, it sets the EOL convention to \n rather than AX25's \r and it automatically reduces the privilege of the &lt;callsign&gt; to a 'safe[r]' level.). </P>
-<LI>As mentioned earlier, for AX25 connections <B><I>you</B></I> are expected to have the AX25 utilities installed, setup, tested and working. See the AX25-HOWTO for more info on this - it really is beyond the scope of this document DX Spider uses ax25d for incoming connections. You need to have entries like this:- </LI>
-<PRE>
-   [ether]                                                                         
-   NOCALL   * * * * * *  L                                                         
-   default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
-   &lt;bbs&gt;
-   NOCALL   * * * * * *  L                                                         
-   default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
-</PRE>
-<P>where 'ether' and 'bbs' are appropriate <B><I>KNOWN WORKING</B></I> axport and nrport names respectively. Obviously you can use different names, callsigns or whatever for your purposes, but it is up to you to get it to work. Note I use BPQ over ethernet which why I have the port names I have.</P>
-<LI>Find your <TT>netrom_call</TT> and <TT>ax25_call</TT> programs (which on my system live in <TT>/usr/sbin)</TT> and chmod them so that they are SUID <TT>root</TT> </LI>
-<PRE>   # chown root ax25_call netrom_call
-   # chmod 4775 ax25_call netrom_call</PRE>
-<P>This has to be done to allow you to specify the correct callsigns on outgoing connects</P>
-<LI>Login to your computer as sysop, and create the initial DX Spider parameters necessary to start the cluster for the first time.</LI>
-<PRE>   $ startx&#9;&#9;&#9;(much easier to use X)
-   $ cd /spider
-   $ mkdir local
-   $ mkdir local_cmd
-   $ cp perl/DXVars.pm local
-   $ cd local
-   $ vi DXVars.pm&#9;&#9;&#9;(or 'joe DXVars.pm' if you're a WordStar fan ;-)
-</PRE>
-<P>Using the distributed DXVars.pm as a a template, set your cluster callsign, sysop callsign and other user info to suit your own environment. Note that this a perl file which will be parsed and executed as part of the cluster. If you get it wrong then perl will complain when you start the cluster process.</P>
-<B><P>PLEASE USE CAPITAL LETTERS FOR CALLSIGNS</P>
-</B><P>DON'T alter the DXVars.pm (or any other file) in /spider/perl, they are overwritten with every release. Any files or commands you place in /spider/local or /spider/local_cmd will automagically be used in preference to the ones in /spider/perl EVEN whilst the cluster is running!</P>
-<PRE>
-   :x
+               </pre>
+               <P>Don't forget to give them a real password. This is really for network cluster logins. The telnet argument does two things, it sets the EOL convention to \n rather than AX25's \r and it automatically reduces the privilege of the &lt;callsign&gt; to a 'safe[r]' level.). 
+               
+               <p><LI>As mentioned earlier, for AX25 connections <B><I>you</B></I> are expected to have the AX25 utilities installed, setup, tested and working. See the AX25-HOWTO for more info on this - it really is beyond the scope of this document DX Spider uses ax25d for incoming connections. You need to have entries like this:- 
+               <PRE>
+[ether]                                                                         
+NOCALL   * * * * * *  L                                                         
+default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
+&lt;bbs&gt;
+NOCALL   * * * * * *  L                                                         
+default  * * * * * *  - sysop /spider/perl/client.pl client.pl %u ax25
+               </PRE>
+               <P>where 'ether' and 'bbs' are appropriate <B><I>KNOWN WORKING</B></I> axport and nrport names respectively. Obviously you can use different names, callsigns or whatever for your purposes, but it is up to you to get it to work. Note I use BPQ over ethernet which why I have the port names I have.
+               
+               <p><LI>Find your <TT>netrom_call</TT> and <TT>ax25_call</TT> programs (which on my system live in <TT>/usr/sbin)</TT> and chmod them so that they are SUID <TT>root</TT> 
+               <PRE>
+# chown root ax25_call netrom_call
+# chmod 4775 ax25_call netrom_call
+               </PRE>
+               <P>This has to be done to allow you to specify the correct callsigns on outgoing connects
+
+               <p><LI>Login to your computer as sysop, and create the initial DX Spider parameters necessary to start the cluster for the first time.
+               <PRE>
+$ startx&#9;&#9;&#9;(much easier to use X)
+$ cd /spider
+$ mkdir local
+$ mkdir local_cmd
+$ cp perl/DXVars.pm local
+$ cd local
+$ vi DXVars.pm&#9;&#9;&#9;(or 'joe DXVars.pm' if you're a WordStar fan ;-)
+               </PRE>
+               <P>Using the distributed DXVars.pm as a a template, set your cluster callsign, sysop callsign and other user info to suit your own environment. Note that this a perl file which will be parsed and executed as part of the cluster. If you get it wrong then perl will complain when you start the cluster process.
+               <P><b>PLEASE USE CAPITAL LETTERS FOR CALLSIGNS</B>
+               <P>DON'T alter the DXVars.pm (or any other file) in /spider/perl, they are overwritten with every release. Any files or commands you place in /spider/local or /spider/local_cmd will automagically be used in preference to the ones in /spider/perl EVEN whilst the cluster is running!
+               <PRE>
+:x
    
-   $ cd ../perl
-</PRE>
-<P>Next, run the following script, which will create the basic user file with you as the sysop.</P>
-<PRE>
-   $ create_sysop.pl
-</PRE>
-<P>Now attempt to startup the cluster program and see whether all the various rivets are flying in approximate formation...</P>
-<PRE>
-   $ cluster.pl
-   DXSpider DX Cluster Version 1.9
-   Copyright (c) 1998 Dirk Koopman G1TLH
-   loading prefixes ...
-   loading band data ...
-   loading user file system ...
-   starting listener ...
-   reading existing message headers
-   reading cron jobs
-   orft we jolly well go ...
-</PRE>
-<LI>now log in again (as 'sysop') or start another rxvt or xterm </LI>
-
-<PRE>
-   $ client.pl
-</PRE>
-<P>at the cluster prompt (which will look something like):-</P>
-<PRE>
-   G1JIM de GB7JIM 12-Dec-98 1718Z &gt;
-</pre>
-Type:
-<pre>
-   set/node GB7XXX
-</PRE>
-<p>(where 'GB7XXX' is a DX cluster which you expect to connect to or from).</p>
-<P>Now shut the cluster down by simply typing 'shutdown' at the prompt.</P>
-<P>The cluster and the client should both go back to prompts </P>
-<p>The callsigns should be the sysop callsign and the cluster callsign
-as per your modified DXVars.pm. You can check that the cluster 
-connections will work by:-
-<pre>
-   $ client.pl gb7xxx      (doesn't have to be uppercase).
-   PC38^GB7JIM^~           <- the cluster thinks this is a cluster
-   ^C                      <- to get out
-</pre>
-</ol>
-<HR>
-<h5>Version: $Id$</h5>
-</BODY>
+$ cd ../perl
+               </PRE>
+               <P>Next, run the following script, which will create the basic user file with you as the sysop.
+               <PRE>
+$ create_sysop.pl
+               </PRE>
+               <P>Now attempt to startup the cluster program and see whether all the various rivets are flying in approximate formation...
+               <PRE>
+$ cluster.pl
+DXSpider DX Cluster Version 1.9
+Copyright (c) 1998 Dirk Koopman G1TLH
+loading prefixes ...
+loading band data ...
+loading user file system ...
+starting listener ...
+reading existing message headers
+reading cron jobs
+orft we jolly well go ...
+               </PRE>
+               
+               <p><LI>now log in again (as 'sysop') or start another rxvt or xterm 
+
+               <PRE>
+$ client.pl
+               </PRE>
+               <P>at the cluster prompt (which will look something like):-
+               <PRE>
+G1JIM de GB7JIM 12-Dec-98 1718Z &gt;
+               </pre>
+               Type:
+               <pre>
+set/node GB7XXX
+               </PRE>
+               <p>(where 'GB7XXX' is a DX cluster which you expect to connect to or from).
+               <P>Now shut the cluster down by simply typing 'shutdown' at the prompt.
+               <P>The cluster and the client should both go back to prompts 
+               <p>The callsigns should be the sysop callsign and the cluster callsign
+                 as per your modified DXVars.pm. You can check that the cluster 
+                 connections will work by:-
+               <pre>
+$ client.pl gb7xxx      (doesn't have to be uppercase).
+PC38^GB7JIM^~           &lt;- the cluster thinks this is a cluster
+^C                      &lt;- to get out
+               </pre>
+       </ol>
+
+       <p>You should now have a basic working system. Best of luck! Can I now draw your attention to
+         the <a href="http://www.dxcluster.org/spider">Bug Reporting</a> System. Some mailing lists will
+         be created RSN for more general discussions.
+
+       <p>Can I commend to you the Announcements mailing list to which you may 
+         <a href="mailto:majordomo@dxcluster.org?subject=Subscribe&body=subscribe%20dxspider-announce%0D%0A--%0D%0A">subscribe</a>.
+         This is a low volume mailing list which will send you announcements of new patches and 
+         such like things as they arise.
+
+       <p>If you like what you see and want to be a part of the ongoing development then 
+         <a href="mailto:majordomo@dxcluster.org?subject=Subscribe&body=subscribe%20dxspider-support%0D%0A--%0D%0A">subscribe</a> 
+         to the support mailing list which will be the initial focus of any discussions.
+
+<!-- Standard Footer!! -->
+       <p>&nbsp;</p>
+       <p>
+         <FONT COLOR="#606060"><hr></font>
+       <font color="#FF0000" size=-2>
+         Copyright &copy; 1998 by Dirk Koopman G1TLH and Iain Phillips G0RDI. All Rights Reserved<br>
+       </font>
+       <font color="#000000" size=-2>$Id$</font>
+
+  </BODY>
 </HTML>
index 640bc4e5345bbf1800a4ee4590cac543666bc462..c494f59b3a60cc9b1098663b009f26b6acf0501e 100644 (file)
@@ -37,193 +37,198 @@ use vars qw(%channels %valid);
 %channels = undef;
 
 %valid = (
-  call => '0,Callsign',
-  conn => '9,Msg Conn ref',
-  user => '9,DXUser ref',
-  startt => '0,Start Time,atime',
-  t => '9,Time,atime',
-  pc50_t => '9,Last PC50 Time,atime',
-  priv => '9,Privilege',
-  state => '0,Current State',
-  oldstate => '5,Last State',
-  list => '9,Dep Chan List',
-  name => '0,User Name',
-  consort => '9,Connection Type',
-  sort => '9,Type of Channel',
-  wwv => '0,Want WWV,yesno',
-  talk => '0,Want Talk,yesno',
-  ann => '0,Want Announce,yesno',
-  here => '0,Here?,yesno',
-  confmode => '0,In Conference?,yesno',
-  dx => '0,DX Spots,yesno',
-  redirect => '0,Redirect messages to',
-  lang => '0,Language',
-  func => '9,Function',
-  loc => '9,Local Vars',     # used by func to store local variables in
-  beep => '0,Want Beeps,yesno',
-  lastread => '9,Last Msg Read',
-  outbound => '9,outbound?,yesno',
-  remotecmd => '9,doing rcmd,yesno',
-  pagelth => '0,Page Length',
-  pagedata => '9,Page Data Store',
-  group => '0,Access Group,parray',               # used to create a group of users/nodes for some purpose or other
-);
+                 call => '0,Callsign',
+                 conn => '9,Msg Conn ref',
+                 user => '9,DXUser ref',
+                 startt => '0,Start Time,atime',
+                 t => '9,Time,atime',
+                 pc50_t => '9,Last PC50 Time,atime',
+                 priv => '9,Privilege',
+                 state => '0,Current State',
+                 oldstate => '5,Last State',
+                 list => '9,Dep Chan List',
+                 name => '0,User Name',
+                 consort => '9,Connection Type',
+                 sort => '9,Type of Channel',
+                 wwv => '0,Want WWV,yesno',
+                 talk => '0,Want Talk,yesno',
+                 ann => '0,Want Announce,yesno',
+                 here => '0,Here?,yesno',
+                 confmode => '0,In Conference?,yesno',
+                 dx => '0,DX Spots,yesno',
+                 redirect => '0,Redirect messages to',
+                 lang => '0,Language',
+                 func => '9,Function',
+                 loc => '9,Local Vars', # used by func to store local variables in
+                 beep => '0,Want Beeps,yesno',
+                 lastread => '9,Last Msg Read',
+                 outbound => '9,outbound?,yesno',
+                 remotecmd => '9,doing rcmd,yesno',
+                 pagelth => '0,Page Length',
+                 pagedata => '9,Page Data Store',
+                 group => '0,Access Group,parray',     # used to create a group of users/nodes for some purpose or other
+                 isolate => '9,Isolate network,yesno',
+                );
 
 # create a new channel object [$obj = DXChannel->new($call, $msg_conn_obj, $user_obj)]
 sub alloc
 {
-  my ($pkg, $call, $conn, $user) = @_;
-  my $self = {};
+       my ($pkg, $call, $conn, $user) = @_;
+       my $self = {};
   
-  die "trying to create a duplicate channel for $call" if $channels{$call};
-  $self->{call} = $call;
-  $self->{conn} = $conn if defined $conn;   # if this isn't defined then it must be a list
-  $self->{user} = $user if defined $user; 
-  $self->{startt} = $self->{t} = time;
-  $self->{state} = 0;
-  $self->{oldstate} = 0;
-  $self->{lang} = $user->{lang} if defined $user;
-  $self->{lang} = $main::lang if !$self->{lang};
-  $user->new_group() if !$user->group;
-  $self->{group} = $user->group;
-  bless $self, $pkg; 
-  return $channels{$call} = $self;
+       die "trying to create a duplicate channel for $call" if $channels{$call};
+       $self->{call} = $call;
+       $self->{conn} = $conn if defined $conn; # if this isn't defined then it must be a list
+       $self->{user} = $user if defined $user; 
+       $self->{startt} = $self->{t} = time;
+       $self->{state} = 0;
+       $self->{oldstate} = 0;
+       $self->{lang} = $user->{lang} if defined $user;
+       $self->{lang} = $main::lang if !$self->{lang};
+       $user->new_group() if !$user->group;
+       $self->{group} = $user->group;
+       bless $self, $pkg; 
+       return $channels{$call} = $self;
 }
 
 # obtain a channel object by callsign [$obj = DXChannel->get($call)]
 sub get
 {
-  my ($pkg, $call) = @_;
-  return $channels{$call};
+       my ($pkg, $call) = @_;
+       return $channels{$call};
 }
 
 # obtain all the channel objects
 sub get_all
 {
-  my ($pkg) = @_;
-  return values(%channels);
+       my ($pkg) = @_;
+       return values(%channels);
 }
 
 # obtain a channel object by searching for its connection reference
 sub get_by_cnum
 {
-  my ($pkg, $conn) = @_;
-  my $self;
+       my ($pkg, $conn) = @_;
+       my $self;
   
-  foreach $self (values(%channels)) {
-    return $self if ($self->{conn} == $conn);
-  }
-  return undef;
+       foreach $self (values(%channels)) {
+               return $self if ($self->{conn} == $conn);
+       }
+       return undef;
 }
 
 # get rid of a channel object [$obj->del()]
 sub del
 {
-  my $self = shift;
-  $self->{group} = undef;      # belt and braces
-  delete $channels{$self->{call}};
+       my $self = shift;
+
+       $self->{group} = undef;         # belt and braces
+       delete $channels{$self->{call}};
 }
 
 # is it an ak1a cluster ?
 sub is_ak1a
 {
-  my $self = shift;
-  return $self->{sort} eq 'A';
+       my $self = shift;
+       return $self->{sort} eq 'A';
 }
 
 # is it a user?
 sub is_user
 {
-  my $self = shift;
-  return $self->{sort} eq 'U';
+       my $self = shift;
+       return $self->{sort} eq 'U';
 }
 
 # is it a connect type
 sub is_connect
 {
-  my $self = shift;
-  return $self->{sort} eq 'C';
+       my $self = shift;
+       return $self->{sort} eq 'C';
 }
 
 # handle out going messages, immediately without waiting for the select to drop
 # this could, in theory, block
 sub send_now
 {
-  my $self = shift;
-  my $conn = $self->{conn};
-  my $sort = shift;
-  my $call = $self->{call};
-  my $line;
+       my $self = shift;
+       my $conn = $self->{conn};
+       my $sort = shift;
+       my $call = $self->{call};
+       my $line;
        
-  foreach $line (@_) {
-    chomp $line;
-       $conn->send_now("$sort$call|$line") if $conn;
-       dbg('chan', "-> $sort $call $line") if $conn;
-  }
-  $self->{t} = time;
+       foreach $line (@_) {
+               chomp $line;
+               $conn->send_now("$sort$call|$line") if $conn;
+               dbg('chan', "-> $sort $call $line") if $conn;
+       }
+       $self->{t} = time;
 }
 
 #
 # the normal output routine
 #
-sub send              # this is always later and always data
+sub send                                               # this is always later and always data
 {
-  my $self = shift;
-  my $conn = $self->{conn};
-  my $call = $self->{call};
-  my $line;
+       my $self = shift;
+       my $conn = $self->{conn};
+       my $call = $self->{call};
+       my $line;
 
-  foreach $line (@_) {
-    chomp $line;
-       $conn->send_later("D$call|$line") if $conn;
-       dbg('chan', "-> D $call $line") if $conn;
-  }
-  $self->{t} = time;
+       foreach $line (@_) {
+               chomp $line;
+               $conn->send_later("D$call|$line") if $conn;
+               dbg('chan', "-> D $call $line") if $conn;
+       }
+       $self->{t} = time;
 }
 
 # send a file (always later)
 sub send_file
 {
-  my ($self, $fn) = @_;
-  my $call = $self->{call};
-  my $conn = $self->{conn};
-  my @buf;
+       my ($self, $fn) = @_;
+       my $call = $self->{call};
+       my $conn = $self->{conn};
+       my @buf;
   
-  open(F, $fn) or die "can't open $fn for sending file ($!)";
-  @buf = <F>;
-  close(F);
-  $self->send(@buf);
+       open(F, $fn) or die "can't open $fn for sending file ($!)";
+       @buf = <F>;
+       close(F);
+       $self->send(@buf);
 }
 
 # this will implement language independence (in time)
 sub msg
 {
-  my $self = shift;
-  return DXM::msg($self->{lang}, @_);
+       my $self = shift;
+       return DXM::msg($self->{lang}, @_);
 }
 
 # change the state of the channel - lots of scope for debugging here :-)
 sub state
 {
-  my $self = shift;
-  if (@_) {
-    $self->{oldstate} = $self->{state};
-    $self->{state} = shift;
-    dbg('state', "$self->{call} channel func $self->{func} state $self->{oldstate} -> $self->{state}\n");
-  }
-  return $self->{state};
+       my $self = shift;
+       if (@_) {
+               $self->{oldstate} = $self->{state};
+               $self->{state} = shift;
+               dbg('state', "$self->{call} channel func $self->{func} state $self->{oldstate} -> $self->{state}\n");
+       }
+       return $self->{state};
 }
 
 # disconnect this channel
 sub disconnect
 {
-  my $self = shift;
-  my $user = $self->{user};
-  my $conn = $self->{conn};
-  $self->finish();
-  $user->close() if defined $user;
-  $conn->disconnect() if defined $conn;
-  $self->del();
+       my $self = shift;
+       my $user = $self->{user};
+       my $conn = $self->{conn};
+       my $call = $self->{call};
+       
+       $self->finish();
+       $conn->send_now("Z$call|bye") if $conn; # this will cause 'client' to disconnect
+       $user->close() if defined $user;
+       $conn->disconnect() if $conn;
+       $self->del();
 }
 
 # various access routines
@@ -234,7 +239,7 @@ sub disconnect
 
 sub fields
 {
-  return keys(%valid);
+       return keys(%valid);
 }
 
 #
@@ -243,20 +248,20 @@ sub fields
 
 sub field_prompt
 { 
-  my ($self, $ele) = @_;
-  return $valid{$ele};
+       my ($self, $ele) = @_;
+       return $valid{$ele};
 }
 
 no strict;
 sub AUTOLOAD
 {
-  my $self = shift;
-  my $name = $AUTOLOAD;
-  return if $name =~ /::DESTROY$/;
-  $name =~ s/.*:://o;
+       my $self = shift;
+       my $name = $AUTOLOAD;
+       return if $name =~ /::DESTROY$/;
+       $name =~ s/.*:://o;
   
-  confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
-  @_ ? $self->{$name} = shift : $self->{$name} ;
+       confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
+       @_ ? $self->{$name} = shift : $self->{$name} ;
 }
 
 1;
index 54cfc516b2173a2ea850ff3b585d4976df25eaaf..8a12b05c2791aa3f137fc13ce4f821f1dde5e528 100644 (file)
@@ -30,13 +30,17 @@ sub print
        my $to = shift;
        my @date = $self->unixtoj(shift);
        my $pattern = shift;
+       my $who = uc shift;
        my $search;
        my @in;
        my @out;
        my $eval;
        my $count;
            
-       $search = $pattern ? "\$ref->[1] =~ /$pattern/" : '1' ;
+       $search = '1' unless $pattern || $who;
+       $search = "\$ref->[1] =~ /$pattern/" if $pattern;
+       $search .= ' && ' if $pattern && $who;
+       $search .= "(\$ref->[2] =~ /$who/ || \$ref->[3] =~ /$who/)" if $who;
        $eval = qq(
                           my \$c;
                           my \$ref;
index c4d895b2e8681d2497f325ce6104b0550b5049f5..63710e4b8f8a622d42fbd6271a802ff02155d711 100644 (file)
@@ -477,10 +477,10 @@ sub queue_msg
 {
        my $sort = shift;
        my $call = shift;
-       my @nodelist = DXProt::get_all_ak1a();
        my $ref;
        my $clref;
        my $dxchan;
+       my @nodelist = DXProt::get_all_ak1a();
        
        # bat down the message list looking for one that needs to go off site and whose
        # nearest node is not busy.
@@ -491,7 +491,7 @@ sub queue_msg
                # in my cluster node list offsite?
                if ($ref->{private}) {
                        if ($ref->{read} == 0) {
-                               $clref = DXCluster->get($ref->{to});
+                               $clref = DXCluster->get_exact($ref->{to});
                                if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all) {
                                        $dxchan = $clref->{dxchan};
                                        $ref->start_msg($dxchan) if $clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
@@ -505,6 +505,7 @@ sub queue_msg
                        my $noderef;
                        foreach $noderef (@nodelist) {
                                next if $noderef->call eq $main::mycall;
+                               next if $noderef->isolate;               # maybe add code for stuff originated here?
                                next if grep { $_ eq $noderef->call } @{$ref->{gotit}};
                                
                                # if we are here we have a node that doesn't have this message
index f50b1e14907ea67133bf96b408ad1f89ed47d7c0..f36127915acc0db69c9fa9e2cd6f8ef5cf70a00a 100644 (file)
@@ -37,6 +37,7 @@ $last_hour = time;                            # last time I did an hourly periodic update
 sub init
 {
        my $user = DXUser->get($main::mycall);
+       $DXProt::myprot_version += $main::version*100;
        $me = DXProt->new($main::mycall, undef, $user); 
        $me->{here} = 1;
        #  $me->{sort} = 'M';    # M for me
@@ -67,6 +68,7 @@ sub start
        $self->{outbound} = $sort eq 'O';
        $self->{priv} = $user->priv;
        $self->{lang} = $user->lang;
+       $self->{isolate} = $user->{isolate};
        $self->{consort} = $line;       # save the connection type
        $self->{here} = 1;
        
@@ -280,7 +282,7 @@ sub normal
                        }
                        
                        # queue up any messages
-                       DXMsg::queue_msg() if $self->state eq 'normal';     
+                       DXMsg::queue_msg() if $self->state eq 'normal';
                        last SWITCH;
                }
                
@@ -465,8 +467,8 @@ sub normal
         #        REBROADCAST!!!!
         #
         
-        my $hops;
-       if (($hops) = $line =~ /H(\d+)\^\~?$/o) {
+       my $hops;
+       if (!$self->{isolate} && (($hops) = $line =~ /H(\d+)\^\~?$/o)) {
                my $newhops = $hops - 1;
                if ($newhops > 0) {
                        $line =~ s/\^H$hops(\^\~?)$/\^H$newhops$1/;     # change the hop count
@@ -526,7 +528,7 @@ sub finish
        
        foreach $node (@gonenodes) {
                next if $node->call eq $call; 
-               broadcast_ak1a(pc21($node->call, 'Gone'), $self); # done like this 'cos DXNodes don't have a pc21 method
+               broadcast_ak1a(pc21($node->call, 'Gone'), $self) unless $self->{isolate}; # done like this 'cos DXNodes don't have a pc21 method
                $node->del();
        }
 
@@ -548,12 +550,16 @@ sub send_local_config
 {
        my $self = shift;
        my $n;
+       my @nodes;
        
        # send our nodes
-       my @nodes = DXNode::get_all();
-       
-       # create a list of all the nodes that are not connected to this connection
-       @nodes = grep { $_->dxchan != $self } @nodes;
+       if ($self->{isolate}) {
+               @nodes = (DXCluster->get_exact($main::mycall));
+       } else {
+               # create a list of all the nodes that are not connected to this connection
+               @nodes = DXNode::get_all();
+               @nodes = grep { $_->dxchan != $self } @nodes;
+       }
        $self->send($me->pc19(@nodes));
        
        # get all the users connected on the above nodes and send them out
@@ -597,7 +603,7 @@ sub broadcast_ak1a
        
        foreach $chan (@chan) {
                next if grep $chan == $_, @except;
-               $chan->send($s);                # send it if it isn't the except list
+               $chan->send($s) unless $chan->{isolate};                # send it if it isn't the except list
        }
 }
 
@@ -612,7 +618,7 @@ sub broadcast_users
        foreach $chan (@chan) {
                next if grep $chan == $_, @except;
                $s =~ s/\a//og if !$chan->{beep};
-               $chan->send($s);                # send it if it isn't the except list
+               $chan->send($s);                # send it if it isn't the except list or hasn't a passout flag
        }
 }
 
index dcd51d611d3ff56334062beb17c7bfc712ab0ca5..da3a68b53e9af486befd6bfeb84d0eceb35c5b49 100644 (file)
@@ -21,7 +21,7 @@ $pc19_max_nodes = 5;
 $pc50_interval = 14*60;
 
 # the version of DX cluster (tm) software I am masquerading as
-$myprot_version = "5447";
+$myprot_version = 5300;
 
 # default hopcount to use
 $def_hopcount = 15;
index a5d5250b161014a817ce5d0c334035600018a18b..9a782960827068a10265f69f84ab17044283749c 100644 (file)
@@ -26,34 +26,34 @@ use strict;
 # create a talk string ($from, $to, $via, $text)
 sub pc10
 {
-  my ($from, $to, $via, $text) = @_;
-  my $user2 = $via ? $to : ' ';
-  my $user1 = $via ? $via : $to;
-  $text = unpad($text);
-  $text = ' ' if !$text;
-  return "PC10^$from^$user1^$text^*^$user2^$main::mycall^~";  
+       my ($from, $to, $via, $text) = @_;
+       my $user2 = $via ? $to : ' ';
+       my $user1 = $via ? $via : $to;
+       $text = unpad($text);
+       $text = ' ' if !$text;
+       return "PC10^$from^$user1^$text^*^$user2^$main::mycall^~";  
 }
 
 # create a dx message (call, freq, dxcall, text) 
 sub pc11
 {
-  my ($mycall, $freq, $dxcall, $text) = @_;
-  my $hops = get_hops(11);
-  my $t = time;
-  $text = ' ' if !$text;
-  return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$hops^~", $freq, cldate($t), ztime($t);
+       my ($mycall, $freq, $dxcall, $text) = @_;
+       my $hops = get_hops(11);
+       my $t = time;
+       $text = ' ' if !$text;
+       return sprintf "PC11^%.1f^$dxcall^%s^%s^$text^$mycall^$hops^~", $freq, cldate($t), ztime($t);
 }
 
 # create an announce message
 sub pc12
 {
-  my ($call, $text, $tonode, $sysop, $wx) = @_;
-  my $hops = get_hops(12);
-  $sysop = ' ' if !$sysop;
-  $text = ' ' if !$text;
-  $wx = '0' if !$wx;
-  $tonode = '*' if !$tonode;
-  return "PC12^$call^$tonode^$text^$sysop^$main::mycall^$wx^$hops^~";
+       my ($call, $text, $tonode, $sysop, $wx) = @_;
+       my $hops = get_hops(12);
+       $sysop = ' ' if !$sysop;
+       $text = ' ' if !$text;
+       $wx = '0' if !$wx;
+       $tonode = '*' if !$tonode;
+       return "PC12^$call^$tonode^$text^$sysop^$main::mycall^$wx^$hops^~";
 }
 
 #
@@ -65,29 +65,29 @@ sub pc12
 #
 sub pc16
 {
-  my $self = shift;
-  my @out;
+       my $self = shift;
+       my @out;
 
-  foreach (@_) {
-    my $str = "PC16^$self->{call}";
-    my $i;
+       foreach (@_) {
+               my $str = "PC16^$self->{call}";
+               my $i;
     
-    for ($i = 0; @_ > 0  && $i < $DXProt::pc16_max_users; $i++) {
-      my $ref = shift;
-         $str .= sprintf "^%s %s %d", $ref->call, $ref->confmode ? '*' : '-', $ref->here;
+               for ($i = 0; @_ > 0  && $i < $DXProt::pc16_max_users; $i++) {
+                       my $ref = shift;
+                       $str .= sprintf "^%s %s %d", $ref->call, $ref->confmode ? '*' : '-', $ref->here;
+               }
+               $str .= sprintf "^%s^", get_hops(16);
+               push @out, $str;
        }
-    $str .= sprintf "^%s^", get_hops(16);
-       push @out, $str;
-  }
-  return (@out);
+       return (@out);
 }
 
 # remove a local user
 sub pc17
 {
-  my ($self, $ref) = @_;
-  my $hops = get_hops(17);
-  return "PC17^$ref->{call}^$self->{call}^$hops^";
+       my ($self, $ref) = @_;
+       my $hops = get_hops(17);
+       return "PC17^$ref->{call}^$self->{call}^$hops^";
 }
 
 # Request init string
@@ -102,102 +102,102 @@ sub pc18
 # 
 sub pc19
 {
-  my $self = shift;
-  my @out;
+       my $self = shift;
+       my @out;
 
-  while (@_) {
-    my $str = "PC19";
-    my $i;
+       while (@_) {
+               my $str = "PC19";
+               my $i;
     
-    for ($i = 0; @_ && $i < $DXProt::pc19_max_nodes; $i++) {
-      my $ref = shift;
-         my $here = $ref->{here} ? '1' : '0';
-         my $confmode = $ref->{confmode} ? '1' : '0';
-      $str .= "^$here^$ref->{call}^$confmode^$ref->{pcversion}";
+               for ($i = 0; @_ && $i < $DXProt::pc19_max_nodes; $i++) {
+                       my $ref = shift;
+                       my $here = $ref->{here} ? '1' : '0';
+                       my $confmode = $ref->{confmode} ? '1' : '0';
+                       $str .= "^$here^$ref->{call}^$confmode^$ref->{pcversion}";
+               }
+               $str .= sprintf "^%s^", get_hops(19);
+               push @out, $str;
        }
-    $str .= sprintf "^%s^", get_hops(19);
-       push @out, $str;
-  }
-  return @out;
+       return @out;
 }
 
 # end of Rinit phase
 sub pc20
 {
-  return 'PC20^';
+       return 'PC20^';
 }
 
 # delete a node
 sub pc21
 {
-  my ($call, $reason) = @_;
-  my $hops = get_hops(21);
-  $reason = "Gone." if !$reason;
-  return "PC21^$call^$reason^$hops^";
+       my ($call, $reason) = @_;
+       my $hops = get_hops(21);
+       $reason = "Gone." if !$reason;
+       return "PC21^$call^$reason^$hops^";
 }
 
 # end of init phase
 sub pc22
 {
-  return 'PC22^';
+       return 'PC22^';
 }
 
 # here status
 sub pc24
 {
-  my $self = shift;
-  my $call = $self->call;
-  my $flag = $self->here ? '1' : '0';
-  my $hops = get_hops(24);
+       my $self = shift;
+       my $call = $self->call;
+       my $flag = $self->here ? '1' : '0';
+       my $hops = get_hops(24);
   
-  return "PC24^$call^$flag^$hops^";
+       return "PC24^$call^$flag^$hops^";
 }
 
 # message start (fromnode, tonode, to, from, t, private, subject, origin)
 sub pc28
 {
-  my ($tonode, $fromnode, $to, $from, $t, $private, $subject, $origin, $rr) = @_;
-  my $date = cldate($t);
-  my $time = ztime($t);
-  $private = $private ? '1' : '0';
-  $rr = $rr ? '1' : '0';
-  return "PC28^$tonode^$fromnode^$to^$from^$date^$time^$private^$subject^ ^5^$rr^ ^$origin^~";
+       my ($tonode, $fromnode, $to, $from, $t, $private, $subject, $origin, $rr) = @_;
+       my $date = cldate($t);
+       my $time = ztime($t);
+       $private = $private ? '1' : '0';
+       $rr = $rr ? '1' : '0';
+       return "PC28^$tonode^$fromnode^$to^$from^$date^$time^$private^$subject^ ^5^$rr^ ^$origin^~";
 }
 
 # message text (from and to node same way round as pc29)
 sub pc29 
 {
-  my ($fromnode, $tonode, $stream, $text) = @_;
-  $text =~ s/\^//og;        # remove ^
-  return "PC29^$fromnode^$tonode^$stream^$text^~";
+       my ($fromnode, $tonode, $stream, $text) = @_;
+       $text =~ s/\^//og;                      # remove ^
+       return "PC29^$fromnode^$tonode^$stream^$text^~";
 }
 
 # subject acknowledge (will have to and from node reversed to pc28)
 sub pc30
 {
-  my ($fromnode, $tonode, $stream) = @_;
-  return "PC30^$fromnode^$tonode^$stream^";
+       my ($fromnode, $tonode, $stream) = @_;
+       return "PC30^$fromnode^$tonode^$stream^";
 }
 
 # acknowledge this tranche of lines (to and from nodes reversed to pc29 and pc28
 sub pc31
 {
-  my ($fromnode, $tonode, $stream) = @_;
-  return "PC31^$fromnode^$tonode^$stream^";
+       my ($fromnode, $tonode, $stream) = @_;
+       return "PC31^$fromnode^$tonode^$stream^";
 }
 
 #  end of message from the sending end (pc28 node order)
 sub pc32
 {
-  my ($fromnode, $tonode, $stream) = @_;
-  return "PC32^$fromnode^$tonode^$stream^";
+       my ($fromnode, $tonode, $stream) = @_;
+       return "PC32^$fromnode^$tonode^$stream^";
 }
 
 # acknowledge end of message from receiving end (opposite pc28 node order)
 sub pc33
 {
-  my ($fromnode, $tonode, $stream) = @_;
-  return "PC33^$fromnode^$tonode^$stream^";
+       my ($fromnode, $tonode, $stream) = @_;
+       return "PC33^$fromnode^$tonode^$stream^";
 }
 
 # remote cmd send
@@ -217,70 +217,70 @@ sub pc35
 # send all the DX clusters I reckon are connected
 sub pc38
 {
-  my @list = DXNode->get_all();
-  my $list;
-  my @nodes;
+       my @list = DXNode->get_all();
+       my $list;
+       my @nodes;
   
-  foreach $list (@list) {
-    push @nodes, $list->call;
-  }
-  return "PC38^" . join(',', @nodes) . "^~";
+       foreach $list (@list) {
+               push @nodes, $list->call;
+       }
+       return "PC38^" . join(',', @nodes) . "^~";
 }
 
 # tell the local node to discconnect
 sub pc39
 {
-  my ($call, $reason) = @_;
-  my $hops = get_hops(39);
-  $reason = "Gone." if !$reason;
-  return "PC39^$call^$reason^$hops^";
+       my ($call, $reason) = @_;
+       my $hops = get_hops(39);
+       $reason = "Gone." if !$reason;
+       return "PC39^$call^$reason^$hops^";
 }
 
 # cue up bulletin or file for transfer
 sub pc40
 {
-  my ($to, $from, $fn, $bull) = @_;
-  $bull = $bull ? '1' : '0';
-  return "PC40^$to^$from^$fn^$bull^5^";
+       my ($to, $from, $fn, $bull) = @_;
+       $bull = $bull ? '1' : '0';
+       return "PC40^$to^$from^$fn^$bull^5^";
 }
 
 # user info
 sub pc41
 {
-  my ($call, $sort, $info) = @_;
-  my $hops = get_hops(41);
-  $sort = $sort ? "$sort" : '0';
-  return "PC41^$call^$sort^$info^$hops^~";
+       my ($call, $sort, $info) = @_;
+       my $hops = get_hops(41);
+       $sort = $sort ? "$sort" : '0';
+       return "PC41^$call^$sort^$info^$hops^~";
 }
 
 # abort message
 sub pc42
 {
-  my ($fromnode, $tonode, $stream) = @_;
-  return "PC42^$fromnode^$tonode^$stream^";
+       my ($fromnode, $tonode, $stream) = @_;
+       return "PC42^$fromnode^$tonode^$stream^";
 }
 
 # bull delete
 sub pc49
 {
-  my ($from, $subject) = @_;
-  my $hops = get_hops(49);
-  return "PC49^$from^$subject^$hops^~";
+       my ($from, $subject) = @_;
+       my $hops = get_hops(49);
+       return "PC49^$from^$subject^$hops^~";
 }
 
 # periodic update of users, plus keep link alive device (always H99)
 sub pc50
 {
-  my $me = DXCluster->get_exact($main::mycall);
-  my $n = $me->users ? $me->users : '0';
-  return "PC50^$main::mycall^$n^H99^";
+       my $me = DXCluster->get_exact($main::mycall);
+       my $n = $me->users ? $me->users : '0';
+       return "PC50^$main::mycall^$n^H99^";
 }
 
 # generate pings
 sub pc51
 {
-  my ($to, $from, $val) = @_;
-  return "PC51^$to^$from^$val^";
+       my ($to, $from, $val) = @_;
+       return "PC51^$to^$from^$val^";
 }
 1;
 __END__
index 65948d59913ebf2e38251e6b2f06b18bad372ffe..e1b44dfad41f94109d6771820c5700ae36b86bf3 100644 (file)
@@ -48,6 +48,7 @@ $filename = undef;
   lang => '0,Language',
   hmsgno => '0,Highest Msgno',
   group => '0,Access Group,parray',               # used to create a group of users/nodes for some purpose or other
+  isolate => '9,Isolate network,yesno',
 );
 
 no strict;
index 9f63c8908234eea858730c314d99493d1d69364a..81bace8ca1271ebc45021e3175cb80edc940592a 100644 (file)
@@ -22,97 +22,97 @@ require Exporter;
 # a full time for logging and other purposes
 sub atime
 {
-  my $t = shift;
-  my ($sec,$min,$hour,$mday,$mon,$year) = gmtime((defined $t) ? $t : time);
-  $year += 1900;
-  my $buf = sprintf "%02d%s%04d\@%02d:%02d:%02d", $mday, $month[$mon], $year, $hour, $min, $sec;
-  return $buf;
+       my $t = shift;
+       my ($sec,$min,$hour,$mday,$mon,$year) = gmtime((defined $t) ? $t : time);
+       $year += 1900;
+       my $buf = sprintf "%02d%s%04d\@%02d:%02d:%02d", $mday, $month[$mon], $year, $hour, $min, $sec;
+       return $buf;
 }
 
 # get a zulu time in cluster format (2300Z)
 sub ztime
 {
-  my $t = shift;
-  my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
-  $year += 1900;
-  my $buf = sprintf "%02d%02dZ", $hour, $min;
-  return $buf;
+       my $t = shift;
+       my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
+       $year += 1900;
+       my $buf = sprintf "%02d%02dZ", $hour, $min;
+       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);
-  $year += 1900;
-  my $buf = sprintf "%02d-%s-%04d", $mday, $month[$mon], $year;
-  return $buf;
+       my $t = shift;
+       my ($sec,$min,$hour,$mday,$mon,$year) = gmtime((defined $t) ? $t : time);
+       $year += 1900;
+       my $buf = sprintf "%02d-%s-%04d", $mday, $month[$mon], $year;
+       return $buf;
 }
 
 # return a cluster style date time
 sub cldatetime
 {
-  my $t = shift;
-  my $date = cldate($t);
-  my $time = ztime($t);
-  return "$date $time";
+       my $t = shift;
+       my $date = cldate($t);
+       my $time = ztime($t);
+       return "$date $time";
 }
 
 # return a unix date from a cluster date and time
 sub cltounix
 {
-  my $date = shift;
-  my $time = shift;
-  $date =~ s/^\s*(\d+)-(\w\w\w)-(19\d\d)$/$1 $2 $3/;
-  $time =~ s/^(\d\d)(\d\d)Z$/$1:$2 +0000/;
-  return str2time("$date $time");
+       my $date = shift;
+       my $time = shift;
+       $date =~ s/^\s*(\d+)-(\w\w\w)-(19\d\d)$/$1 $2 $3/;
+       $time =~ s/^(\d\d)(\d\d)Z$/$1:$2 +0000/;
+       return str2time("$date $time");
 }
 
 # turn a latitude in degrees into a string
 sub slat
 {
-  my $n = shift;
-  my ($deg, $min, $let);
-  $let = $n >= 0 ? 'N' : 'S';
-  $n = abs $n;
-  $deg = int $n;
-  $min = int ((($n - $deg) * 60) + 0.5);
-  return "$deg $min $let";
+       my $n = shift;
+       my ($deg, $min, $let);
+       $let = $n >= 0 ? 'N' : 'S';
+       $n = abs $n;
+       $deg = int $n;
+       $min = int ((($n - $deg) * 60) + 0.5);
+       return "$deg $min $let";
 }
 
 # turn a longitude in degrees into a string
 sub slong
 {
-  my $n = shift;
-  my ($deg, $min, $let);
-  $let = $n >= 0 ? 'E' : 'W';
-  $n = abs $n;
-  $deg = int $n;
-  $min = int ((($n - $deg) * 60) + 0.5);
-  return "$deg $min $let";
+       my $n = shift;
+       my ($deg, $min, $let);
+       $let = $n >= 0 ? 'E' : 'W';
+       $n = abs $n;
+       $deg = int $n;
+       $min = int ((($n - $deg) * 60) + 0.5);
+       return "$deg $min $let";
 }
 
 # turn a true into 'yes' and false into 'no'
 sub yesno
 {
-  my $n = shift;
-  return $n ? $main::yes : $main::no;
+       my $n = shift;
+       return $n ? $main::yes : $main::no;
 }
 
 # format a prompt with its current value and return it with its privilege
 sub promptf
 {
-  my ($line, $value) = @_;
-  my ($priv, $prompt, $action) = split ',', $line;
-
-  # if there is an action treat it as a subroutine and replace $value
-  if ($action) {
-    my $q = qq{\$value = $action(\$value)};
-       eval $q;
-  }
-  $prompt = sprintf "%15s: %s", $prompt, $value;
-  return ($priv, $prompt);
+       my ($line, $value) = @_;
+       my ($priv, $prompt, $action) = split ',', $line;
+
+       # if there is an action treat it as a subroutine and replace $value
+       if ($action) {
+               my $q = qq{\$value = $action(\$value)};
+               eval $q;
+       }
+       $prompt = sprintf "%15s: %s", $prompt, $value;
+       return ($priv, $prompt);
 }
 
 # take an arg as an array list and print it
@@ -125,18 +125,18 @@ sub parray
 # take the arg as an array reference and print as a list of pairs
 sub parraypairs
 {
-  my $ref = shift;
-  my $i;
-  my $out;
+       my $ref = shift;
+       my $i;
+       my $out;
   
-  for ($i = 0; $i < @$ref; $i += 2) {
-    my $r1 = @$ref[$i];
-       my $r2 = @$ref[$i+1];
-       $out .= "$r1-$r2, ";
-  }
-  chop $out;     # remove last space
-  chop $out;     # remove last comma
-  return $out;
+       for ($i = 0; $i < @$ref; $i += 2) {
+               my $r1 = @$ref[$i];
+               my $r2 = @$ref[$i+1];
+               $out .= "$r1-$r2, ";
+       }
+       chop $out;                                      # remove last space
+       chop $out;                                      # remove last comma
+       return $out;
 }
 
 # print all the fields for a record according to privilege
@@ -146,18 +146,20 @@ sub parraypairs
 #
 sub print_all_fields
 {
-  my $self = shift;    # is a dxchan
-  my $ref = shift;     # is a thingy with field_prompt and fields methods defined
-  my @out = @_;
+       my $self = shift;                       # is a dxchan
+       my $ref = shift;                        # is a thingy with field_prompt and fields methods defined
+       my @out = @_;
  
-  my @fields = $ref->fields;
-  my $field;
-  my @out;
-
-  foreach $field (sort @fields) {
-    my ($priv, $ans) = promptf($ref->field_prompt($field), $ref->{$field});
-    push @out, $ans if ($self->priv >= $priv);
-  }
-  return @out;
+       my @fields = $ref->fields;
+       my $field;
+       my @out;
+
+       foreach $field (sort @fields) {
+               if (defined $ref->{$field}) {
+                       my ($priv, $ans) = promptf($ref->field_prompt($field), $ref->{$field});
+                       push @out, $ans if ($self->priv >= $priv);
+               }
+       }
+       return @out;
 }
 
index 73cb401a63150b29d854f688ff5defe64e30a96a..ad71b688ac7ce8e86f46f685deb4e6d3a06c1259 100755 (executable)
@@ -48,7 +48,7 @@ package main;
 
 @inqueue = ();                                 # the main input queue, an array of hashes
 $systime = 0;                                  # the time now (in seconds)
-$version = "1.12";                             # the version no of the software
+$version = "1.13";                             # the version no of the software
 $starttime = 0;                 # the starting time of the cluster   
  
 # handle disconnections