From 6624dcdf07d628e8d6a16fc6549edf40be25b7b2 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 8 Aug 2001 15:56:49 +0000 Subject: [PATCH] merged back NEW_ROUTE into trunk --- Changes | 72 + cmd/Commands_en.hlp | 61 + cmd/clear/route.pl | 37 + cmd/crontab | 2 + cmd/dbshow.pl | 2 +- cmd/disconnect.pl | 12 +- cmd/export.pl | 2 +- cmd/forward/opername.pl | 24 +- cmd/init.pl | 12 +- cmd/merge.pl | 3 +- cmd/ping.pl | 3 +- cmd/rcmd.pl | 6 +- cmd/rinit.pl | 14 +- cmd/set/here.pl | 27 +- cmd/set/homenode.pl | 4 +- cmd/set/location.pl | 4 +- cmd/set/name.pl | 4 +- cmd/set/qra.pl | 4 +- cmd/set/qth.pl | 4 +- cmd/set/send_dbg.pl | 12 + cmd/show/cluster.pl | 2 +- cmd/show/configuration.pl | 24 +- cmd/show/filter.pl | 2 +- cmd/show/newconfiguration.pl | 2 +- cmd/show/node.pl | 10 +- cmd/show/qrz.pl | 12 +- cmd/show/route.pl | 6 +- cmd/show/station.pl | 5 +- cmd/show/users.pl | 36 +- cmd/stat/msg.pl | 9 +- cmd/talk.pl | 2 +- cmd/unset/here.pl | 28 +- cmd/unset/privilege.pl | 11 + cmd/unset/send_dbg.pl | 12 + gtkconsole/DebugHandler.pm | 115 ++ gtkconsole/Text.pm | 53 + gtkconsole/gtkconsole | 246 ++++ html/adminmanual-1.html | 354 ++++- html/adminmanual-2.html | 287 ++-- html/adminmanual-3.html | 331 ++--- html/adminmanual-4.html | 181 +-- html/adminmanual-5.html | 435 ++++-- html/adminmanual-6.html | 165 +-- html/adminmanual-7.html | 2558 ++++++++++++++++++++++++++++++---- html/adminmanual-8.html | 2273 +++++++++++++++++++++++++++++- html/adminmanual.html | 384 +++-- html/installation-1.html | 72 +- html/installation-2.html | 2 +- html/installation-3.html | 2 +- html/installation-4.html | 2 +- html/installation-5.html | 2 +- html/installation-6.html | 2 +- html/installation.html | 6 +- perl/AGWMsg.pm | 46 +- perl/AnnTalk.pm | 6 +- perl/DXChannel.pm | 55 +- perl/DXCluster.pm | 12 +- perl/DXCommandmode.pm | 215 ++- perl/DXCron.pm | 69 +- perl/DXDebug.pm | 61 +- perl/DXHash.pm | 2 +- perl/DXLog.pm | 12 +- perl/DXMsg.pm | 117 +- perl/DXProt.pm | 975 ++++++------- perl/DXProtout.pm | 81 +- perl/DXUser.pm | 7 +- perl/ExtMsg.pm | 47 +- perl/Filter.pm | 23 +- perl/Internet.pm | 19 + perl/Messages | 1 + perl/Msg.pm | 12 +- perl/Route.pm | 144 +- perl/Route/Node.pm | 112 +- perl/Route/User.pm | 13 +- perl/Spot.pm | 88 +- perl/Timer.pm | 4 +- perl/cluster.pl | 87 +- perl/connect.pl | 28 +- sgml/adminmanual.sgml | 606 ++++---- sgml/installation.sgml | 70 +- spider-web/spider.cgi | 166 ++- txt/adminmanual.txt | 1712 +++++++++++------------ txt/installation.txt | 176 ++- 83 files changed, 9360 insertions(+), 3546 deletions(-) create mode 100644 cmd/clear/route.pl create mode 100644 cmd/set/send_dbg.pl create mode 100644 cmd/unset/privilege.pl create mode 100644 cmd/unset/send_dbg.pl create mode 100644 gtkconsole/DebugHandler.pm create mode 100644 gtkconsole/Text.pm create mode 100755 gtkconsole/gtkconsole diff --git a/Changes b/Changes index b1241856..20cea211 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,75 @@ +02Aug01======================================================================= +1. correct manual and help references on accept/route and reject/route. Thanks +to ea1dav for pointing out the errors +30Jul01======================================================================= +1. changes to manuals to add links etc. (g0vgs) +23Jul01======================================================================= +1. made ann,dx spots,wwv,wcy,wx more 'object oriented'. +2. allow for 'enhanced clients' and tell them what sort of thing is being +sent. +3. Allow debug info to be sent via interface to an enhanced client. +21Jul01======================================================================= +1. started a gtkconsole program. It appears to sort of work. Requires Gtk- +Perl-0.7007. +2. start doing some spot statistical stuff. +19Jul01======================================================================= +1. changes to Admin Manual to reflect route filtering. Some alterations to +the help files (g0vgs) +09Jul01======================================================================= +1. fix cron so that it allows stuff to be executed on the hour (ie min=0) +06Jul01======================================================================= +1. fix talk and routing problems to mycall +2. add unset/privilege command to relinquish any sysop privileges you might +have for the current session. +05Jul01======================================================================= +1. disconnect channels whose route node has disappeared +29Jun01======================================================================= +1. fix merge command +28Jun01======================================================================= +1. fix problems with users on more than one node +27Jun01======================================================================= +1. try adding an ARC mail hack +2. slug the not here messages so they can't loopback +25Jun01======================================================================= +1. added automatic 'not here' message +21Jun01======================================================================= +1. fix (some) problems with 'init' +2. fix stat/msg a bit more +3. small change to PC28 generation to make sure that the subject always +contains at least a blank +16Jun01======================================================================= +1. fix talk +2. fix stat/msg +14Jun01======================================================================= +1. changed debug api to (potentially) use less cpu time +2. changed the spider.cgi in Arnold's borrowed java client to Ian's perl +script +3. Added input route filtering +4. put back the set/isolate logic into routing which is now overridable with +filters whcih means a default filter is no longer generated. If you want the +OLD behaviour, do rm /spider/filter/route/*.pl*, restart and try again. +5. Add http_proxy to Internet.pm and allow sh/qrz to use an HTTP Proxy +13Jun01======================================================================= +1. fix init cnd rinit cmds +2. add missing clear/route cmd +10Jun01======================================================================= +1. fix set/here and unset/here +2. fix indirect routing to users two hops away +09Jun01======================================================================= +1. more fixes +2. add set/debug filter so that you can see why your filters aren't working +(for sysops only) +3. add ephemera deduping for all those PC41,24,50 etc etc broadcasts +4. Fix a problem with the connect text being sent on outgoing connections +(this confuses db0fhf amongst other things) +5. catch deep recursion bugs before you run out of memory. +6. Make sure that PC16|17|19|21 update as well as add and delete +7. local announces by the sysop will always be displayed +08Jun01======================================================================= +1. first cut with new routing code. Created NEW_ROUTE branch +2. added acc/route and rej/route commands +3. added stat/route_node and stat/route_user commands to look at the routing +table entities 07Jun01======================================================================= 1. move userconfig.pl and nodeconfig.pl to stat/ 2. fix problem with locally connected users not being removed from the diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index eaef20c9..9f30cd7f 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -55,6 +55,34 @@ default for nodes and users eg:- accept/ann input node_default by G,M,2 accept/ann user_default by G,M,2 +=== 8^ACCEPT/ROUTE [0-9] ^Set an 'accept' filter line for routing +Create an 'accept this routing PC Protocol' line for a filter. + +An accept filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is passed thru that interface. See HELP FILTERING for more info. Please read this +to understand how filters work - it will save a lot of grief later on. + +You can use any of the following things in this line:- + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + +some examples:- + + acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes) + acc/route gb7djk call gb7djk (equiv to SET/ISOLATE) + +You can use the tag 'all' to accept everything eg: + + acc/route all + + === 0^ACCEPT/SPOTS [0-9] ^Set an 'accept' filter line for spots Create an 'accept this spot' line for a filter. @@ -95,6 +123,7 @@ You can use the tag 'all' to accept everything, eg: but this probably for advanced users... + === 8^ACCEPT/SPOTS [input] [0-9] ^Spot filter sysop version This version allows a sysop to set a filter for a callsign as well as the default for nodes and users eg:- @@ -815,6 +844,32 @@ You can use the tag 'all' to reject everything eg: but this probably for advanced users... +=== 8^REJECT/ROUTE [0-9] ^Set an 'reject' filter line for routing +Create an 'reject this routing PC Protocol' line for a filter. + +An reject filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is NOT passed thru that interface. See HELP FILTERING for more info. Please +read this to understand how filters work - it will save a lot of grief later on. + +You can use any of the following things in this line:- + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + +some examples:- + + rej/route gb7djk call_dxcc 61,38 (everything except UK+EIRE nodes) + +You can use the tag 'all' to reject everything eg: + + rej/route all (equiv to [very] restricted mode) + === 8^REJECT/SPOTS [input] [0-9] ^Spot filter sysop version This version allows a sysop to set a filter for a callsign as well as the default for nodes and users eg:- @@ -1151,6 +1206,12 @@ to commands are as default:- If you are a sysop and you come in as a normal user on a remote connection your privilege will automatically be set to 0. +=== 0^UNSET/PRIVILEGE^Remove any privilege for this session +You can use this command to 'protect' this session from unauthorised +use. If you want to get your normal privilege back you will need to +either logout and login again (if you are on a console) or use the +SYSOP command. + === 9^SET/PASSWORD ^Set a users password The password for a user can only be set by a full sysop. The string can contain any characters but any spaces are removed (you can type in diff --git a/cmd/clear/route.pl b/cmd/clear/route.pl new file mode 100644 index 00000000..9cc3705a --- /dev/null +++ b/cmd/clear/route.pl @@ -0,0 +1,37 @@ +# +# clear filters commands +# +# Copyright (c) 2000 Dirk Koopman G1TLH +# +# $Id$ +# +my ($self, $line) = @_; +my @f = split /\s+/, $line; +my @out; +my $dxchan = $self; +my $sort = 'route'; +my $flag; +my $fno = 1; +my $call = $dxchan->call; + +my $f = lc shift @f if @f; +if ($self->priv >= 8) { + if (is_callsign(uc $f)) { + my $uref = DXUser->get(uc $f); + $call = $uref->call if $uref; + } + if (@f) { + $f = lc shift @f; + if ($f eq 'input') { + $flag = 'in'; + $f = shift @f if @f; + } + } +} + +$fno = $f if $f; +my $filter = Filter::read_in($sort, $call, $flag); +Filter::delete($sort, $call, $flag, $fno); +$flag = $flag ? "input " : ""; +push @out, $self->msg('filter4', $flag, $sort, $fno, $call); +return (1, @out); diff --git a/cmd/crontab b/cmd/crontab index d385a844..5ebf80c7 100644 --- a/cmd/crontab +++ b/cmd/crontab @@ -6,3 +6,5 @@ # for doing connections and things # 1 0 * * 0 DXUser::export("$main::data/user_asc") +0 3 * * * Spot::daily() + diff --git a/cmd/dbshow.pl b/cmd/dbshow.pl index 503eafd1..1835ed39 100644 --- a/cmd/dbshow.pl +++ b/cmd/dbshow.pl @@ -24,7 +24,7 @@ foreach $n (@db) { if ($db->remote) { # remote databases - unless (DXCluster->get_exact($db->remote) || DXChannel->get($db->remote)) { + unless (Route::Node::get($db->remote) || DXChannel->get($db->remote)) { push @out, $self->msg('db4', uc $name, $db->remote); last; } diff --git a/cmd/disconnect.pl b/cmd/disconnect.pl index 9acf0ce3..afe9b541 100644 --- a/cmd/disconnect.pl +++ b/cmd/disconnect.pl @@ -26,12 +26,12 @@ foreach $call (@calls) { } elsif (my $conn = Msg->conns($call)) { $conn->disconnect; push @out, $self->msg('disc3', $call); - } elsif (my $ref = DXCluster->get_exact($call)) { - my $dxchancall = $ref->dxchancall; - if ($dxchancall eq $main::mycall || !DXChannel->get($dxchancall)) { - $ref->del; - push @out, $self->msg('disc4', $call); - } +# } elsif (my $ref = DXCluster->get_exact($call)) { +# my $dxchancall = $ref->dxchancall; +# if ($dxchancall eq $main::mycall || !DXChannel->get($dxchancall)) { +# $ref->del; +# push @out, $self->msg('disc4', $call); +# } } else { push @out, $self->msg('e10', $call); } diff --git a/cmd/export.pl b/cmd/export.pl index 723cdcb6..4616564f 100644 --- a/cmd/export.pl +++ b/cmd/export.pl @@ -25,7 +25,7 @@ return (1, $self->msg('read2', $msgno)) unless $ref; if (-e $fn) { my $m = $self->msg('e16', $fn); Log('msg', $self->call . " tried to export $m"); - dbg('msg', $m); + dbg($m) if isdbg('msg'); return (1, $m); } diff --git a/cmd/forward/opername.pl b/cmd/forward/opername.pl index 314a9e37..a80d0ec9 100644 --- a/cmd/forward/opername.pl +++ b/cmd/forward/opername.pl @@ -30,10 +30,26 @@ foreach $call (@f) { my $long = $ref->long; my $node = $ref->homenode; my $latlong = DXBearing::lltos($lat, $long) if $lat && $long; - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $name), $DXProt::me) if $name; - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $qth), $DXProt::me) if $qth; - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $latlong), $DXProt::me) if $latlong; - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $node), $DXProt::me) if $node; + if ($name) { + my $l = DXProt::pc41($DXProt::me, $call, 1, $name); + DXProt::eph_dup($l); + DXProt::broadcast_all_ak1a($l, $DXProt::me) ; + } + if ($qth) { + my $l = DXProt::pc41($call, 2, $qth); + DXProt::eph_dup($l); + DXProt::broadcast_all_ak1a($l, $DXProt::me) ; + } + if ($latlong) { + my $l = DXProt::pc41($call, 3, $latlong); + DXProt::eph_dup($l); + DXProt::broadcast_all_ak1a($l, $DXProt::me) ; + } + if ($node) { + my $l = DXProt::pc41($call, 4, $node); + DXProt::eph_dup($l); + DXProt::broadcast_all_ak1a($l, $DXProt::me) ; + } } } diff --git a/cmd/init.pl b/cmd/init.pl index b88ed013..7f5896f4 100644 --- a/cmd/init.pl +++ b/cmd/init.pl @@ -18,16 +18,10 @@ foreach $call (@calls) { my $dxchan = DXChannel->get($call); if ($dxchan) { if ($dxchan->is_node) { - # first clear out any nodes on this dxchannel - my @gonenodes = grep { $_->dxchan == $dxchan } DXNode::get_all(); - foreach my $node (@gonenodes) { - next if $node->dxchan == $DXProt::me; - next unless $node->dxchan == $dxchan; - DXProt::broadcast_ak1a(DXProt::pc21($node->call, 'Gone, re-init') , $dxchan) unless $dxchan->{isolate}; - $node->del(); - } -# $dxchan->send(DXProt::pc38()); + my $parent = Route::Node::get($call); + my @rout = $parent->del_nodes; + $dxchan->route_pc21($self, @rout) if @rout; $dxchan->send(DXProt::pc18()); $dxchan->state('init'); push @out, $self->msg('init1', $call); diff --git a/cmd/merge.pl b/cmd/merge.pl index 4e35cb8b..26cef42a 100644 --- a/cmd/merge.pl +++ b/cmd/merge.pl @@ -16,10 +16,9 @@ return (1, $self->msg('e12')) if !$f[0]; my $call = uc $f[0]; return (1, $self->msg('e11')) if $call eq $main::mycall; -my $ref = DXCluster->get_exact($call); +my $ref = Route::Node::get($call); my $dxchan = $ref->dxchan if $ref; return (1, $self->msg('e10', $call)) unless $ref; -return (1, $self->msg('e13', $call)) unless $ref->isa('DXNode'); my ($spots, $wwv) = $f[1] =~ m{(\d+)/(\d+)} if $f[1]; diff --git a/cmd/ping.pl b/cmd/ping.pl index d75e1701..05ccd829 100644 --- a/cmd/ping.pl +++ b/cmd/ping.pl @@ -20,8 +20,7 @@ return (1, $self->msg('e6')) if !$call; return (1, $self->msg('pinge1')) if $call eq $main::mycall; # can we see it? Is it a node? -my $noderef = DXCluster->get_exact($call); -$noderef = DXChannel->get($call) unless $noderef; +my $noderef = Route::Node::get($call); return (1, $self->msg('e7', $call)) unless $noderef; diff --git a/cmd/rcmd.pl b/cmd/rcmd.pl index 8afb5b45..31a02181 100644 --- a/cmd/rcmd.pl +++ b/cmd/rcmd.pl @@ -22,11 +22,7 @@ $line =~ s/^\s*$call\s+//; # can we see it? Is it a node? $call = uc $call; -my $noderef = DXCluster->get_exact($call); -unless ($noderef) { - $noderef = DXChannel->get($call); - $noderef = undef unless $noderef && $noderef->is_node; -} +my $noderef = Route::Node::get($call); return (1, $self->msg('e7', $call)) unless $noderef; # rcmd it diff --git a/cmd/rinit.pl b/cmd/rinit.pl index 93748ca1..953a30a9 100644 --- a/cmd/rinit.pl +++ b/cmd/rinit.pl @@ -18,18 +18,10 @@ foreach $call (@calls) { my $dxchan = DXChannel->get($call); if ($dxchan) { if ($dxchan->is_node) { - - # first clear out any nodes on this dxchannel - my @gonenodes = grep { $_->dxchan == $dxchan } DXNode::get_all(); - foreach my $node (@gonenodes) { - next if $node->dxchan == $DXProt::me; - next unless $node->dxchan == $dxchan; - DXProt::broadcast_ak1a(DXProt::pc21($node->call, 'Gone, re-init') , $dxchan) unless $dxchan->{isolate}; - $node->del(); - } -# $dxchan->send(DXProt::pc38()); - $dxchan->send(DXProt::pc20()); + my $parent = Route::Node::get($call); $dxchan->state('init'); + $dxchan->send_local_config; + $dxchan->send(DXProt::pc20()); push @out, $self->msg('init1', $call); } } else { diff --git a/cmd/set/here.pl b/cmd/set/here.pl index 114533ef..44fc4d4b 100644 --- a/cmd/set/here.pl +++ b/cmd/set/here.pl @@ -14,17 +14,22 @@ my @out; @args = $self->call if (!@args || $self->priv < 9); foreach $call (@args) { - $call = uc $call; - my $dxchan = DXChannel->get($call); - my $ref = DXCluster->get_exact($call); - if ($dxchan && $ref) { - $dxchan->here(1); - $ref->here(1); - DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me); - push @out, $self->msg('heres', $call); - } else { - push @out, $self->msg('e3', "Set Here", $call); - } + $call = uc $call; + my $dxchan = DXChannel->get($call); + if ($dxchan) { + $dxchan->here(1); + push @out, $self->msg('heres', $call); + my $ref = Route::User::get($call); + $ref = Route::Node::get($call) unless $ref; + if ($ref) { + $ref->here(1); + my $s = DXProt::pc24($ref); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; + } + } else { + push @out, $self->msg('e3', "Set Here", $call); + } } return (1, @out); diff --git a/cmd/set/homenode.pl b/cmd/set/homenode.pl index 5d3cb413..cf8d9715 100644 --- a/cmd/set/homenode.pl +++ b/cmd/set/homenode.pl @@ -22,7 +22,9 @@ if ($user) { $line = uc $line; $user->homenode($line); $user->put(); - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 4, $line), $DXProt::me); + my $s = DXProt::pc41($call, 4, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; return (1, $self->msg('hnode', $line)); } else { return (1, $self->msg('namee2', $call)); diff --git a/cmd/set/location.pl b/cmd/set/location.pl index 8d1f1350..25db6ba6 100644 --- a/cmd/set/location.pl +++ b/cmd/set/location.pl @@ -24,7 +24,9 @@ if ($user) { my ($lat, $long) = DXBearing::stoll($line); $user->lat($lat); $user->long($long); - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $line), $DXProt::me); + my $s = DXProt::pc41($call, 3, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; unless ($user->qra && DXBearing::is_qra($user->qra) ) { my $qra = DXBearing::lltoqra($lat, $long); $user->qra($qra); diff --git a/cmd/set/name.pl b/cmd/set/name.pl index 6f76ea60..32917574 100644 --- a/cmd/set/name.pl +++ b/cmd/set/name.pl @@ -21,7 +21,9 @@ $user = DXUser->get_current($call); if ($user) { $user->name($line); $user->put(); - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 1, $line), $DXProt::me); + my $s = DXProt::pc41($call, 1, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; return (1, $self->msg('name', $line)); } else { return (1, $self->msg('namee2', $call)); diff --git a/cmd/set/qra.pl b/cmd/set/qra.pl index 1bdc1cec..484666ca 100644 --- a/cmd/set/qra.pl +++ b/cmd/set/qra.pl @@ -26,7 +26,9 @@ if ($user) { $user->lat($lat); $user->long($long); my $s = DXBearing::lltos($lat, $long); - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 3, $s), $DXProt::me); + my $l = DXProt::pc41($call, 3, $s); + DXProt::eph_dup($l); + DXProt::broadcast_all_ak1a($l, $DXProt::me) ; } $user->put(); diff --git a/cmd/set/qth.pl b/cmd/set/qth.pl index 567208c7..2b696f94 100644 --- a/cmd/set/qth.pl +++ b/cmd/set/qth.pl @@ -21,7 +21,9 @@ $user = DXUser->get_current($call); if ($user) { $user->qth($line); $user->put(); - DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me); + my $s = DXProt::pc41($call, 2, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; return (1, $self->msg('qth', $line)); } else { return (1, $self->msg('namee2', $call)); diff --git a/cmd/set/send_dbg.pl b/cmd/set/send_dbg.pl new file mode 100644 index 00000000..2fe8c6db --- /dev/null +++ b/cmd/set/send_dbg.pl @@ -0,0 +1,12 @@ +# +# send debug information to this connection +# +# Copyright (c) 2001 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +return (1, $self->msg('e5')) if $self->priv < 8; +$self->senddbg(1); +return (1, $self->msg('done')); diff --git a/cmd/show/cluster.pl b/cmd/show/cluster.pl index 6fe9b356..066ef7bf 100644 --- a/cmd/show/cluster.pl +++ b/cmd/show/cluster.pl @@ -1,4 +1,4 @@ # # show some statistics # -return (1, DXCluster::cluster() ); +return (1, Route::cluster() ); diff --git a/cmd/show/configuration.pl b/cmd/show/configuration.pl index ba0f3878..a49ffeec 100644 --- a/cmd/show/configuration.pl +++ b/cmd/show/configuration.pl @@ -9,7 +9,7 @@ my ($self, $line) = @_; my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes my @out; -my @nodes = sort {$a->call cmp $b->call} (DXNode::get_all()); +my @nodes = sort {$a->call cmp $b->call} (Route::Node::get_all()); my $node; my @l; my @val; @@ -34,8 +34,8 @@ if ($list[0] && $list[0] =~ /^NOD/) { push @l, ""; $i = 0; } - my $s = $call->{call}; - $s = sprintf "(%s)", $s if $call->{here} == 0; + my $s = $call->call; + $s = sprintf "(%s)", $s unless $call->here; push @l, $s; $i++; } @@ -46,15 +46,14 @@ if ($list[0] && $list[0] =~ /^NOD/) { foreach $node (@nodes) { next if scalar @list && !grep $node->call =~ /^$_/, @list; my $call = $node->call; - $call = "($call)" if $node->here == 0; + $call = "($call)" unless $node->here; @l = (); push @l, $call; - my $nlist = $node->list; - @val = sort {$a->call cmp $b->call} values %{$nlist}; + @val = sort $node->users; my $i = 0; - if (@val == 0 && $node->users) { - push @l, sprintf "(%d users)", $node->users; + if (@val == 0 && $node->usercount) { + push @l, sprintf "(%d users)", $node->usercount; } foreach $call (@val) { if ($i >= 5) { @@ -63,8 +62,13 @@ if ($list[0] && $list[0] =~ /^NOD/) { push @l, ""; $i = 0; } - my $s = $call->{call}; - $s = sprintf "(%s)", $s if $call->{here} == 0; + my $uref = Route::User::get($call); + my $s = $call; + if ($uref) { + $s = sprintf "(%s)", $call unless $uref->here; + } else { + $s = "$call?"; + } push @l, $s; $i++; } diff --git a/cmd/show/filter.pl b/cmd/show/filter.pl index 081ac02e..f1522c35 100644 --- a/cmd/show/filter.pl +++ b/cmd/show/filter.pl @@ -24,7 +24,7 @@ my @in; if (@f) { push @in, @f; } else { - push @in, qw(ann spots wcy wwv); + push @in, qw(route ann spots wcy wwv); } my $sort; diff --git a/cmd/show/newconfiguration.pl b/cmd/show/newconfiguration.pl index a2599b88..66756191 100644 --- a/cmd/show/newconfiguration.pl +++ b/cmd/show/newconfiguration.pl @@ -16,6 +16,6 @@ if (@list && $list[0] =~ /^NOD/) { shift @list; } -push @out, $main::routeroot->config($nodes_only, 0, @list); +push @out, $main::routeroot->config($nodes_only, 0, [], @list); return (1, @out); diff --git a/cmd/show/node.pl b/cmd/show/node.pl index d45cad36..53a974ca 100644 --- a/cmd/show/node.pl +++ b/cmd/show/node.pl @@ -24,8 +24,8 @@ my @out; my $count; # search thru the user for nodes -unless (@call) { - +if ($call[0] eq 'ALL') { + shift @call; my ($action, $key, $data) = (0,0,0); for ($action = DXUser::R_FIRST, $count = 0; !$DXUser::dbm->seq($key, $data, $action); $action = DXUser::R_NEXT) { if ($data =~ m{sort => '[ACRSX]'}) { @@ -33,11 +33,13 @@ unless (@call) { ++$count; } } +} elsif (@call == 0) { + @call = map {$_->call} DXChannel::get_all_nodes(); } my $call; foreach $call (@call) { - my $clref = DXCluster->get_exact($call); + my $clref = Route::Node::get($call); my $uref = DXUser->get_current($call); my ($sort, $ver); @@ -60,7 +62,7 @@ foreach $call (@call) { $sort = "Spider"; $ver = $main::version; } else { - $ver = $clref->pcversion if $clref && $clref->pcversion; + $ver = $clref->version if $clref && $clref->version; } my ($major, $minor, $subs) = unpack("AAA*", $ver) if $ver; diff --git a/cmd/show/qrz.pl b/cmd/show/qrz.pl index 6779db42..0d6e2d48 100644 --- a/cmd/show/qrz.pl +++ b/cmd/show/qrz.pl @@ -13,23 +13,27 @@ my @out; return (1, $self->msg('e24')) unless $Internet::allow; return (1, "SHOW/QRZ , e.g. SH/QRZ g1tlh") unless @list; +my $target = $Internet::http_proxy || 'qrz.com'; +my $port = $Internet::http_proxy_port || 80; +my $url = ''; +$url = 'http://qrz.com' if $Internet::http_proxy; use Net::Telnet; my $t = new Net::Telnet; foreach $l (@list) { - $t->open(Host => "qrz.com", - Port => 80, + $t->open(Host => $target, + Port => $port, Timeout => 15); if ($t) { - my $s = "GET /dxcluster.cgi?callsign=$l\&uid=$Internet::qrz_uid\&pw=$Internet::qrz_pw HTTP/1.0\n\n"; + my $s = "GET $url/dxcluster.cgi?callsign=$l\&uid=$Internet::qrz_uid\&pw=$Internet::qrz_pw HTTP/1.0\n\n"; # print $s; $t->print($s); Log('call', "$call: show/qrz \U$l"); my $state = "blank"; while (my $result = $t->getline) { - dbg('qrz', $result); + dbg($result) if isdbg('qrz'); if ($state eq 'blank' && $result =~ /^\s*Callsign\s*:/i) { $state = 'go'; } elsif ($state eq 'go') { diff --git a/cmd/show/route.pl b/cmd/show/route.pl index 95497d2d..45214003 100644 --- a/cmd/show/route.pl +++ b/cmd/show/route.pl @@ -14,9 +14,11 @@ return (1, $self->msg('e6')) unless @list; my $l; foreach $l (@list) { - my $ref = DXCluster->get_exact($l); + my $ref = Route::get($l); if ($ref) { - push @out, $self->msg('route', $l, $ref->mynode->call, $ref->dxchan->call); + my $parents = join ',', $ref->parents; + my $dxchan = $ref->dxchan; + push @out, $self->msg('route', $l, $parents, $dxchan->call); } else { push @out, $self->msg('e7', $l); } diff --git a/cmd/show/station.pl b/cmd/show/station.pl index 4aadd222..b5b0f6c5 100644 --- a/cmd/show/station.pl +++ b/cmd/show/station.pl @@ -59,9 +59,8 @@ if (@f == 0) { $miles = $dx * 0.62133785; } - my $cref = DXCluster->get_exact($call); - $cref = DXCluster->get($call) unless $cref; - my $seek = $cref->mynode->call if $cref; + my $cref = Route::get($call); + my $seek = join(',', $cref->parents) if $cref; if ($seek) { push @out, "User : $call (at $seek)"; diff --git a/cmd/show/users.pl b/cmd/show/users.pl index 55a34bec..46d641ed 100644 --- a/cmd/show/users.pl +++ b/cmd/show/users.pl @@ -7,29 +7,33 @@ # my ($self, $line) = @_; -my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes +my @list = map { uc } split /\s+/, $line; # list of callsigns of nodes my @out; -my $node = (DXNode->get($main::mycall)); +my $node = $main::routeroot; push @out, "Callsigns connected to $main::mycall"; my $call; my $i = 0; my @l; -my $nlist = $node->list; -my @val = sort {$a->call cmp $b->call} values %{$nlist}; +my @val = sort $node->users; foreach $call (@val) { - if (@list) { - next if !grep $call->call eq $_, @list; - } - if ($i >= 5) { - push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; - @l = (); - $i = 0; - } - my $s = $call->{call}; - $s = sprintf "(%s)", $s if $call->{here} == 0; - push @l, $s; - $i++; + if (@list) { + next if !grep $call eq $_, @list; + } + if ($i >= 5) { + push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; + @l = (); + $i = 0; + } + my $uref = Route::User::get($call); + my $s = $call; + if ($uref) { + $s = sprintf "(%s)", $call unless $uref->here; + } else { + $s = "$call?"; + } + push @l, $s; + $i++; } push @out, sprintf "%-12s %-12s %-12s %-12s %-12s %-12s", @l; diff --git a/cmd/stat/msg.pl b/cmd/stat/msg.pl index 2b7ed752..da4a7262 100644 --- a/cmd/stat/msg.pl +++ b/cmd/stat/msg.pl @@ -15,15 +15,18 @@ if (@list == 0) { push @out, "Work Queue Keys"; push @out, map { " $_" } sort keys %DXMsg::work; push @out, "Busy Queue Data"; - foreach $ref (sort {$a->call cmp $b->call} DXMsg::get_all_busy) { + foreach $ref (sort {$a->to cmp $b->to} DXMsg::get_all_busy) { my $msgno = $ref->msgno; my $stream = $ref->stream; - my $lines = scalar $ref->lines; + my $lref = $ref->lines; + my $lines = 0; + $lines = @$lref if $lref; my $count = $ref->count; + my $to = $ref->to; my $lastt = $ref->lastt ? " Last Processed: " . cldatetime($ref->lastt) : ""; my $waitt = $ref->waitt ? " Waiting since: " . cldatetime($ref->waitt) : ""; - push @out, " $call -> msg: $msgno stream: $stream Count: $count Lines: $lines$lastt$waitt"; + push @out, " $call -> $to msg: $msgno stream: $stream Count: $count Lines: $lines$lastt$waitt"; } } else { foreach my $msgno (@list) { diff --git a/cmd/talk.pl b/cmd/talk.pl index 8082e240..45ac857e 100644 --- a/cmd/talk.pl +++ b/cmd/talk.pl @@ -31,7 +31,7 @@ if ($via) { $to = uc $to if $to; $via = uc $via if $via; my $call = $via ? $via : $to; -my $clref = DXCluster->get_exact($call); # try an exact call +my $clref = Route::get($call); # try an exact call my $dxchan = $clref->dxchan if $clref; return (1, $self->msg('e7', $call)) unless $dxchan; diff --git a/cmd/unset/here.pl b/cmd/unset/here.pl index 6666d4e7..4da517c1 100644 --- a/cmd/unset/here.pl +++ b/cmd/unset/here.pl @@ -14,16 +14,22 @@ my @out; @args = $self->call if (!@args || $self->priv < 9); foreach $call (@args) { - $call = uc $call; - my $dxchan = DXChannel->get($call); - my $ref = DXCluster->get_exact($call); - if ($dxchan && $ref) { - $dxchan->here(0); - $ref->here(0); - DXProt::broadcast_all_ak1a(DXProt::pc24($ref), $DXProt::me); - push @out, $self->msg('hereu', $call); - } else { - push @out, $self->msg('e3', "Unset Here", $call); - } + $call = uc $call; + my $dxchan = DXChannel->get($call); + if ($dxchan) { + $dxchan->here(0); + push @out, $self->msg('hereu', $call); + my $ref = Route::User::get($call); + $ref = Route::Node::get($call) unless $ref; + if ($ref) { + $ref->here(0); + my $s = DXProt::pc24($ref); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; + } + } else { + push @out, $self->msg('e3', "Unset Here", $call); + } } + return (1, @out); diff --git a/cmd/unset/privilege.pl b/cmd/unset/privilege.pl new file mode 100644 index 00000000..d031a4ac --- /dev/null +++ b/cmd/unset/privilege.pl @@ -0,0 +1,11 @@ +# +# unset any privileges that the user might have for THIS SESSION only +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# +my ($self, $line) = @_; +$self->priv(0); +return (1, $self->msg('done')); + diff --git a/cmd/unset/send_dbg.pl b/cmd/unset/send_dbg.pl new file mode 100644 index 00000000..6173644c --- /dev/null +++ b/cmd/unset/send_dbg.pl @@ -0,0 +1,12 @@ +# +# send debug information to this connection +# +# Copyright (c) 2001 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +return (1, $self->msg('e5')) if $self->priv < 8; +$self->senddbg(0); +return (1, $self->msg('done')); diff --git a/gtkconsole/DebugHandler.pm b/gtkconsole/DebugHandler.pm new file mode 100644 index 00000000..f6e51d37 --- /dev/null +++ b/gtkconsole/DebugHandler.pm @@ -0,0 +1,115 @@ +# +# Gtk Handler for Debug Files +# + +package DebugHandler; + +use strict; + +use Gtk; +use DXVars; +use DXLog; +use DXUtil; + +use vars qw(@ISA); +@ISA = qw(Gtk::Window); + +sub new +{ + my $pkg = shift; + my $parent = shift; + my $regexp = shift || ''; + my $nolines = shift || 1; + + my $self = new Gtk::Window; + bless $self, $pkg; + $self->set_default_size(400, 400); + $self->set_transient_for($parent) if $parent; + $self->signal_connect('destroy', sub {$self->destroy} ); + $self->signal_connect('delete_event', sub {$self->destroy; return undef;}); + $self->set_title("Debug Output - $regexp"); + $self->border_width(0); + $self->show; + + my $box1 = new Gtk::VBox(0, 0); + $self->add($box1); + $box1->show; + + my $swin = new Gtk::ScrolledWindow(undef, undef); + $swin->set_policy('automatic', 'automatic'); + $box1->pack_start($swin, 1, 1, 0); + $swin->show; + + my $button = new Gtk::Button('close'); + $button->signal_connect('clicked', sub {$self->destroy}); + $box1->pack_end($button, 0, 1, 0); + $button->show; + + my $clist = new_with_titles Gtk::CList('Time', 'Data'); + $swin->add($clist); + $clist->show; + + $self->{fp} = DXLog::new('debug', 'dat', 'd'); + + my @today = Julian::unixtoj(time); + my $fh = $self->{fh} = $self->{fp}->open(@today); + $fh->seek(0, 2); + $self->{regexp} = $regexp if $regexp; + $self->{nolines} = $nolines; + $self->{clist} = $clist; + + $self->{id} = Gtk::Gdk->input_add($fh->fileno, ['read'], sub {$self->handleinp(@_); 1;}, $fh); + + $self->show_all; + return $self; +} + +sub destroy +{ + my $self = shift; + $self->{fp}->close; + Gtk::Gdk->input_remove($self->{id}); + delete $self->{clist}; +} + +sub handleinp +{ + my ($self, $socket, $fd, $flags) = @_; + if ($flags->{read}) { + my $offset = exists $self->{rbuf} ? length $self->{rbuf} : 0; + my $l = sysread($socket, $self->{rbuf}, 1024, $offset); + if (defined $l) { + if ($l) { + while ($self->{rbuf} =~ s/^([^\015\012]*)\015?\012//) { + my $line = $1; + if ($self->{regexp}) { + push @{$self->{prev}}, $line; + shift @{$self->{prev}} while @{$self->{prev}} > $self->{nolines}; + if ($line =~ m{$self->{regexp}}oi) { + $self->printit(@{$self->{prev}}); + @{$self->{prev}} = []; + } + } else { + $self->printit($line); + } + } + } + } + } +} + +sub printit +{ + my $self = shift; + my $clist = $self->{clist}; + while (@_) { + my $line = shift; + $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; + my @line = split /\^/, $line, 2; + my $t = shift @line; + my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time); + my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec; + $clist->append($buf, @line); + } +} +1; diff --git a/gtkconsole/Text.pm b/gtkconsole/Text.pm new file mode 100644 index 00000000..8957da25 --- /dev/null +++ b/gtkconsole/Text.pm @@ -0,0 +1,53 @@ +# +# create a text area with scroll bars +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +package Text; + +use strict; +use Gtk; + +use vars qw(@ISA); +@ISA = qw(Gtk::Text); + +sub new +{ + my $pkg = shift; + my ($vbar, $hbar) = @_; + + my $font = Gtk::Gdk::Font->load("-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r"); + my $text = new Gtk::Text(undef,undef); + my $style = $text->style; + $style->font($font); + $text->set_style($style); + $text->show; + my $vscroll = new Gtk::VScrollbar($text->vadj); + $vscroll->show; + my $box = new Gtk::HBox(); + $box->add($text); + $box->pack_start($vscroll, 0,0,0); + $box->show; + + my $self = bless $box, $pkg; + $self->{text} = $text; + $self->{text}->{font} = $font; + return $self; +} + +sub destroy +{ + my $self = shift; + delete $self->{text}->{font}; + delete $self->{text}; +} + +sub text +{ + return shift->{text}; +} + +1; diff --git a/gtkconsole/gtkconsole b/gtkconsole/gtkconsole new file mode 100755 index 00000000..e5458244 --- /dev/null +++ b/gtkconsole/gtkconsole @@ -0,0 +1,246 @@ +#!/usr/bin/perl -w +# +# A GTK based console program +# +# Copyright (c) 2001 Dirk Koopman G1TLH +# +# $Id$ +# + +# search local then perl directories +BEGIN { + # root of directory tree for this system + $root = "/spider"; + $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'}; + + unshift @INC, "$root/perl"; # this IS the right way round! + unshift @INC, "$root/gtkconsole"; + unshift @INC, "$root/local"; +} + +use strict; + +use Gtk qw(-init); + +use vars qw(@modules $font); + +@modules = (); # is the list of modules that need init calling + # on them. It is set up by each 'use'ed module + # that has Gtk stuff in it +$font = Gtk::Gdk::Font->load("-misc-fixed-medium-r-normal-*-*-130-*-*-c-*-koi8-r"); + +use DXVars; +use DXUtil; +use IO::Socket::INET; +use Text; +use DebugHandler; + +# +# main initialisation +# +my $call = uc shift @ARGV if @ARGV; +$call = uc $main::myalias unless $call; +my ($scall, $ssid) = split /-/, $call; +$ssid = undef unless $ssid && $ssid =~ /^\d+$/; +if ($ssid) { + $ssid = 15 if $ssid > 15; + $call = "$scall-$ssid"; +} + +die "You cannot connect as your cluster callsign ($main::mycall)\n" if $call eq $main::mycall; + + +my $sock = IO::Socket::INET->new(PeerAddr=>$main::clusteraddr, PeerPort=>$main::clusterport); +die "Cannot connect to $main::clusteraddr/$main::clusterport ($!)\n" unless $sock; +sendmsg('A', 'local'); +sendmsg('G', '2'); +sendmsg('I', 'set/page 500'); +sendmsg('I', 'set/nobeep'); + +# +# start of GTK stuff +# + + +# main window +my $main = new Gtk::Window('toplevel'); +$main->set_default_size(600, 600); +$main->set_policy(0, 1, 0); +$main->signal_connect('destroy', sub { Gtk->exit(0); }); +$main->signal_connect('delete_event', sub { Gtk->exit(0); }); +$main->set_title("gtkconsole - The DXSpider Console - $call"); + +# the main vbox +my $vbox = new Gtk::VBox(0, 1); +$vbox->border_width(1); +$main->add($vbox); + +# the menu bar +my @menu = ( + {path => '/_File', type => ''}, + {path => '/_File/Quit', callback => sub {Gtk->exit(0)}}, + {path => '/_Help', type => ''}, + {path => '/_Help/About'}, + ); +my $accel = new Gtk::AccelGroup(); +my $itemf = new Gtk::ItemFactory('Gtk::MenuBar', '
', $accel); +$itemf->create_items(@menu); +$main->add_accel_group($accel); +my $menu = $itemf->get_widget('
'); +$vbox->pack_start($menu, 0, 1, 0); +$menu->show; + + +my $top = new Text(1); +my $toplist = $top->text; +$toplist->set_editable(0); +$toplist->sensitive(0); + +# add the handler for incoming messages from the node +my $tophandler = Gtk::Gdk->input_add($sock->fileno, ['read'], \&tophandler, $sock); +my $rbuf = ""; # used in handler + +#$toplist->{signalid} = $toplist->signal_connect(insert_text => \&doinsert, $toplist); +#$bot->{signalid} = $bot->signal_connect(insert_text => \&botinsert, $bot); +$vbox->pack_start($top, 1, 1, 0); +$vbox->show; + +# the bottom handler +my $bot = new Gtk::Entry; +my $style = $toplist->style; +$style->font($main::font); +$bot->set_style($style); +$bot->set_editable(1); +$bot->signal_connect('activate', \&bothandler); +$bot->can_default(1); +$bot->grab_default; +$bot->grab_focus; +$bot->show; + +# a horizontal box +my $hbox = new Gtk::HBox; +$hbox->show; + +# callsign and current date and time +my $calllabel = new Gtk::Label($call); +my $date = new Gtk::Label(cldatetime(time)); +Gtk->timeout_add(1000, \&updatetime); +$calllabel->show; +$date->show; + +$hbox->pack_start( $calllabel, 0, 1, 0 ); +$hbox->pack_end($date, 0, 1, 0); + + +$vbox->pack_start($hbox, 0, 1, 0); + +# nice little separator +my $separator = new Gtk::HSeparator(); +$vbox->pack_start( $separator, 0, 1, 0 ); +$separator->show(); +$vbox->pack_start($bot, 0, 1, 0); + +# the main loop +$main->show_all; +Gtk->main; + +# +# handlers +# + +sub updatetime +{ + $date->set_text(cldatetime(time)); + 1; +} + +sub doinsert { + my ($self, $text) = @_; + + # we temporarily block this handler to avoid recursion + $self->signal_handler_block($self->{signalid}); + my $pos = $self->insert($self->{font}, $toplist->style->black, $toplist->style->white, $text); + $self->signal_handler_unblock($self->{signalid}); + + # we already inserted the text if it was valid: no need + # for the self to process this signal emission + $self->signal_emit_stop_by_name('insert-text'); + 1; +} + +sub bothandler +{ + my ($self, $data) = @_; + my $msg = $self->get_text; + $msg =~ s/\r?\n$//; + $self->set_text(''); + senddata($msg); +} + +sub tophandler +{ + my ($socket, $fd, $flags) = @_; + if ($flags->{read}) { + my $offset = length $rbuf; + my $l = sysread($socket, $rbuf, 1024, $offset); + if (defined $l) { + my $freeze; + if ($l) { + while ($rbuf =~ s/^([^\015\012]*)\015?\012//) { + my $msg = $1; + $msg =~ s/\%([0-9A-F][0-9A-F])/chr(hex($1))/eg; + $msg =~ s/[\x00-\x08\x0a-\x19\x1b-\x1f\x80-\x9f]/./g; # immutable CSI sequence + control characters + $toplist->freeze unless $freeze++; + handlemsg($msg); + } + if ($freeze) { + $toplist->thaw; + $toplist->vadj->set_value($toplist->vadj->upper); + $toplist->vadj->value_changed; + } + } else { + Gtk->exit(0); + } + } else { + Gtk->exit(0); + } + } +} + +sub handlemsg +{ + my $msg = shift; + my ($sort, $call, $line) = $msg =~ /^(\w)([^\|]+)\|(.*)$/; + if ($sort eq 'D') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'X') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'Y') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'V') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'N') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'W') { + $toplist->insert($toplist->{font}, undef, undef, "$line\n"); + } elsif ($sort eq 'Z') { + Gtk->exit(0); + } +} + +# +# subroutine +# + +sub senddata +{ + my $msg = shift; + sendmsg('I', $msg); +} + +sub sendmsg +{ + my ($let, $msg) = @_; + $msg =~ s/([\%\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg; + $sock->print("$let$call|$msg\n"); +} diff --git a/html/adminmanual-1.html b/html/adminmanual-1.html index b9691bbb..78a3afcc 100644 --- a/html/adminmanual-1.html +++ b/html/adminmanual-1.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Hop control + The DXSpider Administration Manual v1.48: Routing and Filtering @@ -13,14 +13,348 @@ Previous Contents
-

1. Hop control

+

1. Routing and Filtering

-

Starting with version 1.13 there is simple hop control available on a per -node basis. Also it is possible to isolate a network completely so that you -get all the benefits of being on that network, but can't pass on information -from it to any other networks you may be connected to (or vice versa). +

1.1 Introduction +

+ +

From DXSpider version 1.48, major changes were introduced to the way +node connections are treated. This is part of an ongoing process to +remove problems with loops and to enable talk and other functions to +propagate across the whole of the worldwide cluster network. In fact, +in a Spider network, it would be useful, perhaps even necessary to +have loops. This would give real resilience to the network, meaning +that if a link dropped, the information flow would simply come in and +go out via a different route. Of course, we do not have a complete +network of Spider nodes, there are other programs out there. Some of +these do not have any protection from loops. Certainly AK1A does not +handle loops well at all. It is therefore necessary to have some form +of protection for these nodes. +

+

This is achieved by using filtering on a route basis. There is a +default setting to help to protect the network, especially useful for new +and inexperienced SysOps. The idea is simple. When Spider is started +for the first time and a connection is made to or from another node, +the default is to only send the nodes you already have that are in your +own zone. For example, in the UK the default setting would be to send +only UK nodes to any connection. This can be filtered further (down to +a single node if needed) or expanded as required. +

+

+

1.2 Route Filters +

+ +

As mentioned in the introduction, a default setting exists. If this is +all you want to use then that is fine, you have nothing else to do. +However, if you want to make any alterations then you need to know +a bit about filters. +

+

It is possible to reset the default setting for node connections should +you wish to do so, however this can be dangerous to the network unless +you have some experience in how all this works.... be careful! It is +also possible to change settings for one connection only. You can, +therefore, have many different filters set dependent on the amount of +node links you have.

-

1.1 Basic hop control +

I should at this stage give a little bit of background on filters. All +the filters in Spider work in basically the same way. You can either +accept or reject various options in order to create the filter rules +you wish to achieve. Some filters are user settable, others can only +be altered by the sysop. Route filtering can only be done by the sysop. +

+

1.3 The default_node filter +

+ +

As discussed previously, a default setting exists that only sends nodes +from your own zone. This can be overridden by using the default_node +filter option like this ... +

+

+
+reject/route default_node <filter_option>
+
+or
+
+accept/route default_node <filter_option>
+
+
+

+

where filter_option is one of the following ... +

+

+
+call <prefixes>
+call_dxcc <numbers>
+call_itu <numbers>
+call_zone <numbers>
+origin <prefixes>
+origin_dxcc <numbers>
+origin_itu <numbers>
+origin_zone <numbers>
+
+
+

+

Please be careful if you alter this setting, it will affect +ALL your links! +

+

1.4 General route filtering +

+ +

Exactly the same rules apply for general route filtering. You would +use either an accept filter or a reject filter like this ... +

+

+
+reject/route <node_call> <filter_option>
+
+or
+
+accept/route <node_call> <filter_option> 
+
+
+

+

where filter_option is one of the following ... +

+

+
+call <prefixes>
+call_dxcc <numbers>
+call_itu <numbers>
+call_zone <numbers>
+origin <prefixes>
+origin_dxcc <numbers>
+origin_itu <numbers>
+origin_zone <numbers>
+
+
+

+

Here are some examples of route filters ... +

+

+
+rej/route gb7djk call_dxcc 61,38 (everything except  UK+EIRE nodes)
+rej/route all     (equiv to [very] restricted mode)
+acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes)
+acc/route gb7djk call gb7djk     (equiv to SET/ISOLATE)
+
+
+

+

1.5 General filter rules +

+ +

Upto v1.44 it was not possible for the user to set their own filters. From +v1.45 though that has all changed. It is now possible to set filters for just +about anything you wish. If you have just updated from an older version of +DXSpider you will need to update your new filters. You do not need to do +anything with your old filters, they will be renamed as you update. +

+

There are 3 basic commands involved in setting and manipulating filters. These +are accept, reject and clear. First we will look +generally at filtering. There are a number of things you can filter in the +DXSpider system. They all use the same general mechanism. +

+

In general terms you can create a 'reject' or an 'accept' filter which can have +up to 10 lines in it. You do this using, for example ... +

+

+
+ 
+accept/spots .....
+reject/spots .....
+
+
+

where ..... are the specific commands for that type of filter. There are filters +for spots, wwv, announce, wcy and (for sysops) connects. See each different +accept or reject command reference for more details. +

There is also a command to clear out one or more lines in a filter. They are ... +

+

+
+clear/spots 1
+clear/spots all
+
+
+

There is clear/xxxx command for each type of filter. +

+

and you can check that your filters have worked by the command ... +

+

+
+  
+show/filter
+
+
+

+

For now we are going to use spots for the examples, but you can apply the same +principles to all types of filter. +

+

1.6 Types of filter +

+ +

There are two main types of filter, accept or reject. You +can use either to achieve the result you want dependent on your own preference +and which is more simple to do. It is pointless writing 8 lines of reject +filters when 1 accept filter would do the same thing! Each filter has 10 +lines (of any length) which are tried in order. If a line matches then the +action you have specified is taken (ie reject means ignore it and accept +means take it) +

+

If you specify reject filters, then any lines that arrive that match the filter +will be dumped but all else will be accepted. If you use an accept filter, +then ONLY the lines in the filter will be accepted and all else will be dumped. +For example if you have a single line accept filter ... +

+

+
+accept/spots on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

then you will ONLY get VHF spots from or to CQ zones +14, 15 and 16. +

+

If you set a reject filter like this ... +

+

+
+reject/spots on hf/cw
+
+
+

Then you will get everything EXCEPT HF CW spots. You could make this +single filter even more flexible. For example, if you are interested in IOTA +and will work it even on CW even though normally you are not interested in +CW, then you could say ... +

+

+
+reject/spots on hf/cw and not info iota
+
+
+

But in that case you might only be interested in iota and say:- +

+

+
+accept/spots not on hf/cw or info iota
+
+
+

which achieves exactly the same thing. You should choose one or the other +until you are comfortable with the way it works. You can mix them if you +wish (actually you can have an accept AND a reject on the same line) but +don't attempt this until you are sure you know what you are doing! +

+

You can arrange your filter lines into logical units, either for your own +understanding or simply convenience. Here is an example ... +

+

+
+reject/spots 1 on hf/cw
+reject/spots 2 on 50000/1400000 not (by_zone 14,15,16 or call_zone 14,15,16)  
+
+
+

What this does is to ignore all HF CW spots and also rejects any spots on VHF +which don't either originate or spot someone in Europe. +

+

This is an example where you would use a line number (1 and 2 in this case), if +you leave the digit out, the system assumes '1'. Digits '0'-'9' are available. +This make it easier to see just what filters you have set. It also makes it +more simple to remove individual filters, during a contest for example. +

+

You will notice in the above example that the second line has brackets. Look +at the line logically. You can see there are 2 separate sections to it. We +are saying reject spots that are VHF or above APART from those in +zones 14, 15 and 16 (either spotted there or originated there). If you did +not have the brackets to separate the 2 sections, then Spider would read it +logically from the front and see a different expression entirely ... +

+

+
+(on 50000/1400000 and by_zone 14,15,16) or call_zone 14,15,16 
+
+
+

The simple way to remember this is, if you use OR - use brackets. Whilst we are +here CASE is not important. 'And BY_Zone' is just the same as 'and by_zone'. +

As mentioned earlier, setting several filters can be more flexible than +simply setting one complex one. Doing it in this way means that if you want +to alter your filter you can just redefine or remove one or more lines of it or +one line. For example ... +

+

+
+reject/spots 1 on hf/ssb
+
+
+

would redefine our earlier example, or +

+

+
+clear/spots 1
+
+
+

To remove all the filter lines in the spot filter ... +

+

+
+clear/spots all
+
+
+

+

1.7 Filter options +

+ +

You can filter in several different ways. The options are listed in the +various helpfiles for accept, reject and filter. +

+

1.8 Default filters +

+ +

Sometimes all that is needed is a general rule for node connects. This can +be done with a node_default filter. This rule will always be followed, even +if the link is isolated, unless another filter is set specifically. Default +rules can be set for nodes and users. They can be set for spots, announces, +WWV and WCY. They can also be used for hops. An example might look like +this ... +

+

+
+accept/spot node_default by_zone 14,15,16,20,33
+set/hops node_default spot 50
+
+
+

This filter is for spots only, you could set others for announce, WWV and WCY. +This filter would work for ALL nodes unless a specific filter is written to +override it for a particular node. You can also set a user_default should +you require. It is important to note that default filters should be +considered to be "connected". By this I mean that should you override the +default filter for spots, you need to add a rule for the hops for spots also. +

+

1.9 Advanced filtering +

+ +

Once you are happy with the results you get, you may like to experiment. +

+

The previous example that filters hf/cw spots and accepts vhf/uhf spots from EU +can be written with a mixed filter, for example ... +

+

+
+rej/spot on hf/cw
+acc/spot on 0/30000
+acc/spot 2 on 50000/1400000 and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

Note that the first filter has not been specified with a number. This will +automatically be assumed to be number 1. In this case, we have said reject all +HF spots in the CW section of the bands but accept all others at HF. Also +accept anything in VHF and above spotted in or by operators in the zones +14, 15 and 16. Each filter slot actually has a 'reject' slot and +an 'accept' slot. The reject slot is executed BEFORE the accept slot. +

+

It was mentioned earlier that after a reject test that doesn't match, the default +for following tests is 'accept', the reverse is true for 'accept'. In the example +what happens is that the reject is executed first, any non hf/cw spot is passed +to the accept line, which lets through everything else on HF. The next filter line +lets through just VHF/UHF spots from EU. +

+

1.10 Basic hop control

In /spider/data you will find a file called hop_table.pl. This is the file @@ -92,14 +426,14 @@ are not exhaustive but should give you a good idea of how the file works. If you alter the file during runtime, the command load/hops will bring your changes into effect.

-

1.2 Isolating networks +

1.11 Isolating networks

It is possible to isolate networks from each other on a "gateway" node using the set/isolate <node_call> command.

The effect of this is to partition an isolated network completely from another -nodes connected to your node. Your node will appear on and otherwise behave +node connected to your node. Your node will appear on and otherwise behave normally on every network to which you are connected, but data from an isolated network will not cross onto any other network or vice versa. However all the spot, announce and WWV traffic and personal messages will still be handled @@ -130,8 +464,6 @@ $in = [

-

There is a lot more on filtering in the next section. -


Next Previous diff --git a/html/adminmanual-2.html b/html/adminmanual-2.html index 39b9bde3..b28822c1 100644 --- a/html/adminmanual-2.html +++ b/html/adminmanual-2.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Filtering (Old Style upto v1.44) + The DXSpider Administration Manual v1.48: Other filters @@ -13,231 +13,118 @@ Previous Contents
-

2. Filtering (Old Style upto v1.44)

- -

Filters can be set for spots, announcements and WWV. You will find the -directories for these under /spider/filter. You will find some examples in -the directories with the suffix .issue. There are two types of -filter, one for incoming information and one for outgoing information. -Outgoing filters are in the form CALLSIGN.pl and incoming filters -are in the form in_CALLSIGN.pl. Filters can be set for both nodes -and users. -

-

All filters work in basically the same way. There are several elements -delimited by commas. There can be many lines in the filter and they are -read from the top by the program. When writing a filter you need to think -carefully about just what you want to achieve. You are either going to write -a filter to accept or to reject. Think of a filter as -having 2 main elements. For a reject filter, you would have a line or multiple -lines rejecting the things you do not wish to receive and then a default line -accepting everything else that is not included in the filter. Likewise, for an -accept filter, you would have a line or multiple lines accepting the things you -wish to receive and a default line rejecting everthing else. -

-

In the example below, a user requires a filter that would only return SSB spots -posted in Europe on the HF bands. This is achieved by first rejecting the CW -section of each HF band and rejecting all of VHF, UHF etc based on frequency. -Secondly, a filter rule is set based on CQ zones to only accept spots posted in -Europe. Lastly, a default filter rule is set to reject anything outside the filter. -

-

-
-$in = [
-        [ 0, 0, 'r', # reject all CW spots
-                [
-                1800.0, 1850.0,
-                3500.0, 3600.0,
-                7000.0, 7040.0,
-                14000.0, 14100.0,
-                18068.0, 18110.0,
-                21000.0, 21150.0,
-                24890.0, 24930.0,
-                28000.0, 28180.0,
-                30000.0, 49000000000.0,
-                ] ,1 ],
-        [ 1, 11, 'n', [ 14, 15, 16, 20, 33, ], 15 ], #accept EU
-        [ 0, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else
-];
-
-
-

-

The actual elements of each filter are described more fully in the following -sections. -

-

2.1 Spots +

2. Other filters

+ +

2.1 Filtering Mail

-

The elements of the Spot filter are .... -

-

-
-[action, field_no, sort, possible_values, hops]
-
-
-

-

There are 3 elements here to look at. Firstly, the action element. This is -very simple and only 2 possible states exist, accept (1) or drop (0). -

-

The second element is the field_no. There are 13 possiblities to choose from -here .... +

In the /spider/msg directory you will find a file called badmsg.pl.issue. Rename +this to badmsg.pl and edit the file. The original looks something like this ....

-      0 = frequency
-      1 = call
-      2 = date in unix format
-      3 = comment
-      4 = spotter
-      5 = spotted dxcc country
-      6 = spotter's dxcc country
-      7 = origin
-      8 = spotted itu
-      9 = spotted cq
-      10 = spotter's itu
-      11 = spotter's cq
-      12 = callsign of the channel on which the spot has appeared
-
-
-

-

The third element tells us what to expect in the fourth element. There are -4 possibilities .... -

-

-
-     n - numeric list of numbers e.g. [ 1,2,3 ]
-     r - ranges of pairs of numbers e.g. between 2 and 4 or 10 to 17 - [ 2,4, 10,17 ]
-     a - an alphanumeric regex
-     d - the default rule
-
-
-

-

The fifth element is simply the hops to set in this filter. This would only -be used if the filter was for a node of course and overrides the hop count in -hop_table.pl. -

-

So, let's look at an example spot filter. It does not matter in the example -who the filter is to be used for. So, what do we need in the filter? We need -to filter the spots the user/node requires and also set a default rule for -anything else outside the filter. Below is a simple filter that stops spots -arriving from outside Europe. -

-

-
-$in = [
-  [ 0, 4, 'a', '^(K|N|A|W|VE|VA|J)'],  # 0 = drop, 'a' = alphanumeric
-  [ 1, 0, 'd', 0, 1 ],                 # 1 = want, 'd' = everything else
-                     ];
-
-
-

-

So the filter is wrapped in between a pair of square brackets. This tells -Spider to look in between these limits. Then each line is contained within -its own square brackets and ends with a comma. Lets look carefully at the first -line. The first element is 0 (drop). Therefore anything we put on this line -will not be accepted. The next element is 4. This means we are filtering by -the spotter. The third element is the letter "a" which tells the program to -expect an alphanumeric expression in the fourth element. The fourth element -is a list of letters separated by the pipe symbol. -

-

What this line does is tell the program to drop any spots posted by anyone in -the USA, Canada or Japan. -

-

The second line is the default rule for anything else. The "d" tells us this -and the line simply reads... accept anything else. -

-

You can add as many lines as you need to complete the filter but if there are -several lines of the same type it is neater to enclose them all as one line. -An example of this is where specific bands are set. We could write this like -this .... -

-

-
-[ 0,0,'r',[1800.0, 2000.0], 1],
-[ 0,0,'r',[10100.0, 10150.0], 1],
-[ 0,0,'r',[14000.0, 14350.0], 1],
-[ 0,0,'r',[18000.0, 18200.0], 1],
-
-
-

-

But the line below achieves the same thing and is more efficient .... -

-

-
-  [ 0, 0, 'r',
-    [  
-      1800.0, 2000.0,         # top band 
-      10100.0, 10150.0,       # WARC  
-      14000.0, 14350.0,       # 20m
-      18000.0, 18200.0,       # WARC
-    [ ,1 ],
+
+# the list of regexes for messages that we won't store having
+# received them (bear in mind that we must receive them fully before
+# we can bin them)
+
+
+# The format of each line is as follows
+
+#     type      source             pattern 
+#     P/B/F     T/F/O/S            regex  
+
+# type: P - private, B - bulletin (msg), F - file (ak1a bull)
+# source: T - to field, F - from field,  O - origin, S - subject 
+# pattern: a perl regex on the field requested
+
+# Currently only type B and P msgs are affected by this code.
+# 
+# The list is read from the top down, the first pattern that matches
+# causes the action to be taken.
+
+# The pattern can be undef or 0 in which case it will always be selected
+# for the action specified
+
+
+
+package DXMsg;
+
+@badmsg = (
+'B',    'T',    'SALE', 
+'B',    'T',    'WANTED',
+'B',    'S',    'WANTED',
+'B',    'S',    'SALE', 
+'B',    'S',    'WTB',
+'B',    'S',    'WTS',
+'B',    'T',    'FS',
+);
 

+

I think this is fairly self explanatory. It is simply a list of subject +headers that we do not want to pass on to either the users of the cluster or +the other cluster nodes that we are linked to. This is usually because of +rules and regulations pertaining to items for sale etc in a particular country.

-

2.2 Announcements +

2.2 Filtering DX callouts (Depricated)

+

From version 1.47, this method is replaced by the command set/baddx +

+

In the same way as mail, there are some types of spot we do not wish to pass on +to users or linked cluster nodes. In the /spider/data directory you will find +a file called baddx.pl.issue. Rename this to baddx.pl and edit the file. The +original looks like this ....

 
-# This is an example announce or filter allowing only West EU announces
-# 
-# The element list is:-
-# 0 - callsign of announcer
-# 1 - destination * = all, <callsign> = routed to the node
-# 2 - text
-# 3 - * - sysop, <some text> - special list eg 6MUK, ' ', normal announce
-# 4 - origin
-# 5 - 0 - announce, 1 - wx
-# 6 - channel callsign (the interface from which this spot came)
-
-$in = [
-        [ 1, 0, 'a', '^(P[ABCDE]|DK0WCY|G|M|2|EI|F|ON)' ],
-        [ 0, 0, 'd', 0 ]
-];
+# the list of dx spot addresses that we don't store and don't pass on
+
+
+package DXProt;
+
+@baddx = qw 
+
+ FROG 
+ SALE
+ FORSALE
+ WANTED
+ P1RATE
+ PIRATE
+ TEST
+ DXTEST
+ NIL
+ NOCALL 
+);
 
-

In this example, only the prefixes listed will be allowed. It is possible to -be quite specific. The Dutch prefix "P" is followed by several secondary -identifiers which are allowed. So, in the example, "PA" or "PE" would be ok -but not "PG". It is even possible to allow information from a single callsign. -In the example this is DK0WCY, to allow the posting of his Aurora Beacon.

-

2.3 WWV +

Again, this is simply a list of names we do not want to see in the spotted +field of a DX callout. +

+

+

2.3 Filtering words from text fields in Announce, Talk and DX spots

+

Create a file in /spider/data called badwords. The format is quite +simple. Lines beginning with # are ignored so comments can be added. An +example file is below ...

-
-# This is an example WWV filter
-# 
-# The element list is:-
-# 0 - nominal unix date of spot (ie the day + hour:13)
-# 1 - the hour
-# 2 - SFI
-# 3 - K
-# 4 - I
-# 5 - text
-# 6 - spotter
-# 7 - origin
-# 8 - incoming interface callsign
-
-# this one doesn't filter, it just sets the hop count to 6 and is
-# used mainly just to override any isolation from WWV coming from
-# the internet.
-
-$in = [
-        [ 1, 0, 'd', 0, 6 ]
-];
+# Below is a list of words we do not wish to see on the cluster
+grunge grunged grunging
+splodge splodger splodging
+grince
+fluffle
 
+

Multiple words can be used on the same line as shown. Obviously these +are just examples :-)

-

It should be noted that the filter will start to be used only once a user/node -has logged out and back in again. -

I am not going to spend any more time on these filters now as they will become -more "comprehensive" in the near future. +

You can reload the file from the cluster prompt as sysop with load/badwords.


Next diff --git a/html/adminmanual-3.html b/html/adminmanual-3.html index 20910151..d9f11702 100644 --- a/html/adminmanual-3.html +++ b/html/adminmanual-3.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Filtering (New Style v1.45 and later) + The DXSpider Administration Manual v1.48: Mail @@ -13,223 +13,198 @@ Previous Contents
-

3. Filtering (New Style v1.45 and later)

+

3. Mail

-

3.1 General filter rules +

DXSpider deals seamlessly with standard AK1A type mail. It supports both +personal and bulletin mail and the sysop has additional commands to ensure +that mail gets to where it is meant. DXSpider will send mail almost +immediately, assuming that the target is on line. However, only one +mail message is dealt with at any one time. If a mail message is already +being sent or recieved, then the new message will be queued until it has +finished. +

The cluster mail is automatically deleted after 30 days unless the sysop +sets the "keep" flag using the msg command. +

+

3.1 Personal mail

-

Upto v1.44 it was not possible for the user to set their own filters. From -v1.45 though that has all changed. It is now possible to set filters for just -about anything you wish. If you have just updated from an older version of -DXSpider you will need to update your new filters. You do not need to do -anything with your old filters, they will be renamed as you update. +

Personal mail is sent using the sp command. This is actually the +default method of sending mail and so a simple s for send will do. +A full list of the send commands and options is in the command set +section, so I will not duplicate them here.

-

There are 3 basic commands involved in setting and manipulating filters. These -are accept, reject and clear. First we will look -generally at filtering. There are a number of things you can filter in the -DXSpider system. They all use the same general mechanism. -

-

In general terms you can create a 'reject' or an 'accept' filter which can have -up to 10 lines in it. You do this using, for example ... -

-

-
- 
-accept/spots .....
-reject/spots .....
-
-
-

where ..... are the specific commands for that type of filter. There are filters -for spots, wwv, announce, wcy and (for sysops) connects. See each different -accept or reject command reference for more details. -

There is also a command to clear out one or more lines in a filter. They are ... -

-

-
-clear/spots 1
-clear/spots all
-
-
-

There is clear/xxxx command for each type of filter. -

-

and you can check that your filters have worked by the command ... -

-

-
-  
-show/filter
-
-
-

-

For now we are going to use spots for the examples, but you can apply the same -principles to all types of filter. -

-

3.2 Types of filter +

3.2 Bulletin mail

-

There are two main types of filter, accept or reject. You -can use either to achieve the result you want dependent on your own preference -and which is more simple to do. It is pointless writing 8 lines of reject -filters when 1 accept filter would do the same thing! Each filter has 10 -lines (of any length) which are tried in order. If a line matches then the -action you have specified is taken (ie reject means ignore it and accept -means take it) -

-

If you specify reject filters, then any lines that arrive that match the filter -will be dumped but all else will be accepted. If you use an accept filter, -then ONLY the lines in the filter will be accepted and all else will be dumped. -For example if you have a single line accept filter ... -

-

-
-accept/spots on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
-
-
-

then you will ONLY get VHF spots from or to CQ zones -14, 15 and 16. +

Bulletin mail is sent by using the sb command. This is one of the +most common mistakes users make when sending mail. They send a bulletin +mail with s or sp instead of sb and of course +the message never leaves the cluster. This can be rectified by the sysop +by using the msg command.

-

If you set a reject filter like this ... +

Bulletin addresses can be set using the Forward.pl file.

-

-
-reject/spots on hf/cw
-
-
-

Then you will get everything EXCEPT HF CW spots. You could make this -single filter even more flexible. For example, if you are interested in IOTA -and will work it even on CW even though normally you are not interested in -CW, then you could say ... -

-

-
-reject/spots on hf/cw and not info iota
-
-
-

But in that case you might only be interested in iota and say:- -

-

-
-accept/spots not on hf/cw or info iota
-
-
-

which achieves exactly the same thing. You should choose one or the other -until you are comfortable with the way it works. You can mix them if you -wish (actually you can have an accept AND a reject on the same line) but -don't attempt this until you are sure you know what you are doing! -

-

You can arrange your filter lines into logical units, either for your own -understanding or simply convenience. Here is an example ... +

3.3 Forward.pl +

+ +

DXSpider receives all and any mail sent to it without any alterations needed +in files. Because personal and bulletin mail are treated differently, there +is no need for a list of accepted bulletin addresses. It is necessary, however, +to tell the program which links accept which bulletins. For example, it is +pointless sending bulletins addresses to "UK" to any links other than UK +ones. The file that does this is called forward.pl and lives in /spider/msg. +At default, like other spider files it is named forward.pl.issue. Rename it +to forward.pl and edit the file to match your requirements. +The format is below ...

-reject/spots 1 on hf/cw
-reject/spots 2 on 50000/1400000 not (by_zone 14,15,16 or call_zone 14,15,16)  
+#
+# this is an example message forwarding file for the system
+#
+# The format of each line is as follows
+#
+#     type    to/from/at pattern action  destinations
+#     P/B/F     T/F/A     regex   I/F    [ call [, call ...] ]
+#
+# type: P - private, B - bulletin (msg), F - file (ak1a bull)
+# to/from/at: T - to field, F - from field, A - home bbs, O - origin 
+# pattern: a perl regex on the field requested
+# action: I - ignore, F - forward
+# destinations: a reference to an array containing node callsigns
+#
+# if it is non-private and isn't in here then it won't get forwarded 
+#
+# Currently only type B msgs are affected by this code.
+# 
+# The list is read from the top down, the first pattern that matches
+# causes the action to be taken.
+#
+# The pattern can be undef or 0 in which case it will always be selected
+# for the action specified
+#
+# If the BBS list is undef or 0 and the action is 'F' (and it matches the
+# pattern) then it will always be forwarded to every node that doesn't have 
+# it (I strongly recommend you don't use this unless you REALLY mean it, if
+# you allow a new link with this on EVERY bull will be forwarded immediately
+# on first connection)
+#
+
+package DXMsg;
+
+@forward = (
+'B',    'T',    'LOCAL',        'F',    [ qw(GB7MBC) ],
+'B',    'T',    'ALL',          'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'UK',           'F',    [ qw(GB7BAA GB7ADX) ],
+'B',    'T',    'QSL',          'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'QSLINF',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'DX',           'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'DXINFO',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'DXNEWS',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'DXQSL',        'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+'B',    'T',    'SYSOP',        'F',    [ qw(GB7BAA GB7ADX) ],
+'B',    'T',    '50MHZ',        'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
+);
 
-

What this does is to ignore all HF CW spots and also rejects any spots on VHF -which don't either originate or spot someone in Europe. +

Simply insert a bulletin address and state in the brackets where you wish +that mail to go. For example, you can see here that mail sent to "UK" will +only be sent to the UK links and not to PA4AB-14.

-

This is an example where you would use a line number (1 and 2 in this case), if -you leave the digit out, the system assumes '1'. Digits '0'-'9' are available. -This make it easier to see just what filters you have set. It also makes it -more simple to remove individual filters, during a contest for example. +

To force the cluster to reread the file use load/forward

-

You will notice in the above example that the second line has brackets. Look -at the line logically. You can see there are 2 separate sections to it. We -are saying reject spots that are VHF or above APART from those in -zones 14, 15 and 16 (either spotted there or originated there). If you did -not have the brackets to separate the 2 sections, then Spider would read it -logically from the front and see a different expression entirely ...

-

-
-(on 50000/1400000 and by_zone 14,15,16) or call_zone 14,15,16 
-
-
-

The simple way to remember this is, if you use OR - use brackets. Whilst we are -here CASE is not important. 'And BY_Zone' is just the same as 'and by_zone'. -

As mentioned earlier, setting several filters can be more flexible than -simply setting one complex one. Doing it in this way means that if you want -to alter your filter you can just redefine or remove one or more lines of it or -one line. For example ... +

3.4 The msg command +

+ +

The msg command is a very powerful and flexible tool for the +sysop. It allows the sysop to alter to and from fields and make other +changes to manage the cluster mail. +

Here is a full list of the various options ...

-reject/spots 1 on hf/ssb
+  MSG TO <msgno> <call>     - change TO callsign to <call>
+  MSG FRom <msgno> <call>   - change FROM callsign to <call>
+  MSG PRrivate <msgno>      - set private flag
+  MSG NOPRrivate <msgno>    - unset private flag
+  MSG RR <msgno>            - set RR flag
+  MSG NORR <msgno>          - unset RR flag
+  MSG KEep <msgno>          - set the keep flag (message won't be deleted ever)
+  MSG NOKEep <msgno>        - unset the keep flag
+  MSG SUbject <msgno> <new> - change the subject to <new>
+  MSG WAittime <msgno>      - remove any waiting time for this message
+  MSG NOREad <msgno>        - mark message as unread
+  MSG REad <msgno>          - mark message as read
+  MSG QUeue                 - queue any outstanding bulletins
+  MSG QUeue 1               - queue any outstanding private messages
 
-

would redefine our earlier example, or +

These commands are simply typed from within the cluster as the sysop user.

-

-
-clear/spots 1
-
-
-

To remove all the filter lines in the spot filter ... +

3.5 Message status +

+ +

You can check on a message from within the cluster by using the command +stat/msg. This will give you additional information on the +message number including which nodes have received it, which node it +was received from and when etc. Here is an example of the output of +the command ...

-clear/spots all
+G0VGS de GB7MBC 28-Jan-2001 1308Z >
+stat/msg 6869
+        From: GB7DJK
+    Msg Time: 26-Jan-2001 1302Z
+       Msgno: 6869
+      Origin: GB7DJK
+        Size: 8012
+     Subject: AMSAT 2line KEPS 01025.AMSAT
+          To: UK
+Got it Nodes: GB7BAA, GB7ADX
+     Private: 0
+Read Confirm: 0
+  Times read: 0
+G0VGS de GB7MBC 28-Jan-2001 1308Z >
 

-

3.3 Filter options +

3.6 Filtering mail

-

You can filter in several different ways. The options are listed in the -various helpfiles for accept, reject and filter. +

This is described in the section on Other filters so I will not +duplicate it here.

-

3.4 Default filters +

3.7 Distribution lists

-

Sometimes all that is needed is a general rule for node connects. This can -be done with a node_default filter. This rule will always be followed, even -if the link is isolated, unless another filter is set specifically. Default -rules can be set for nodes and users. They can be set for spots, announces, -WWV and WCY. They can also be used for hops. An example might look like -this ... +

Distribution lists are simply a list of users to send certain types of +mail to. An example of this is mail you only wish to send to other +sysops. In /spider/msg there is a directory called distro. You +put any distibution lists in here. For example, here is a file called +SYSOP.pl that caters for the UK sysops.

-accept/spot node_default by_zone 14,15,16,20,33
-set/hops node_default spot 50
+qw(GB7TLH GB7DJK GB7DXM GB7CDX GB7BPQ GB7DXN GB7MBC GB7MBC-6 GB7MDX
+   GB7NDX GB7SDX GB7TDX GB7UDX GB7YDX GB7ADX GB7BAA GB7DXA GB7DXH 
+   GB7DXK GB7DXI GB7DXS)
 
-

This filter is for spots only, you could set others for announce, WWV and WCY. -This filter would work for ALL nodes unless a specific filter is written to -override it for a particular node. You can also set a user_default should -you require. It is important to note that default filters should be -considered to be "connected". By this I mean that should you override the -default filter for spots, you need to add a rule for the hops for spots also. -

-

3.5 Advanced filtering +

Any mail sent to "sysop" would only be sent to the callsigns in this list. +

+

3.8 BBS interface

-

Once you are happy with the results you get, you may like to experiment. -

-

The previous example that filters hf/cw spots and accepts vhf/uhf spots from EU -can be written with a mixed filter, for example ... -

-

-
-rej/spot on hf/cw
-acc/spot on 0/30000
-acc/spot 2 on 50000/1400000 and (by_zone 14,15,16 or call_zone 14,15,16)
-
-
-

Note that the first filter has not been specified with a number. This will -automatically be assumed to be number 1. In this case, we have said reject all -HF spots in the CW section of the bands but accept all others at HF. Also -accept anything in VHF and above spotted in or by operators in the zones -14, 15 and 16. Each filter slot actually has a 'reject' slot and -an 'accept' slot. The reject slot is executed BEFORE the accept slot. -

-

It was mentioned earlier that after a reject test that doesn't match, the default -for following tests is 'accept', the reverse is true for 'accept'. In the example -what happens is that the reject is executed first, any non hf/cw spot is passed -to the accept line, which lets through everything else on HF. The next filter line -lets through just VHF/UHF spots from EU. -

+

Spider provides a simple BBS interface. No input is required from the sysop +of the cluster at all. The BBS simply sets the cluster as a BBS and pushes +any required mail to the cluster. No mail can flow from Spider to the BBS, +the interface is one-way. +

+

Please be careful not to flood the cluster network with unnecessary mail. +Make sure you only send mail to the clusters that want it by using the +Forward.pl file very carefully.


Next diff --git a/html/adminmanual-4.html b/html/adminmanual-4.html index 48e5702a..9faec437 100644 --- a/html/adminmanual-4.html +++ b/html/adminmanual-4.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Other filters + The DXSpider Administration Manual v1.48: Databases @@ -13,118 +13,129 @@ Previous Contents
-

4. Other filters

+

4. Databases

-

4.1 Filtering Mail +

Spider allows the creation of local or remote databases. It supports +chained databases, allowing several different databases to be scanned +with one simple command. Importing of databases is limited at present +to the standard AK1A databases such as OBLAST and the DB0SDX QSL +database but will expand with time. +

+

4.1 Creating databases

-

In the /spider/msg directory you will find a file called badmsg.pl.issue. Rename -this to badmsg.pl and edit the file. The original looks something like this .... +

Creating a database could not be more simple. All the commands are +sent from the cluster prompt as the sysop user. +

To create a database you use the command dbcreate. It can +be used in 3 different ways like so ..

-
-# the list of regexes for messages that we won't store having
-# received them (bear in mind that we must receive them fully before
-# we can bin them)
-
-
-# The format of each line is as follows
-
-#     type      source             pattern 
-#     P/B/F     T/F/O/S            regex  
-
-# type: P - private, B - bulletin (msg), F - file (ak1a bull)
-# source: T - to field, F - from field,  O - origin, S - subject 
-# pattern: a perl regex on the field requested
-
-# Currently only type B and P msgs are affected by this code.
-# 
-# The list is read from the top down, the first pattern that matches
-# causes the action to be taken.
-
-# The pattern can be undef or 0 in which case it will always be selected
-# for the action specified
-
-
-
-package DXMsg;
-
-@badmsg = (
-'B',    'T',    'SALE', 
-'B',    'T',    'WANTED',
-'B',    'S',    'WANTED',
-'B',    'S',    'SALE', 
-'B',    'S',    'WTB',
-'B',    'S',    'WTS',
-'B',    'T',    'FS',
-);
+dbcreate <name>
 
+

To simply create a database locally, you just tell the command the +name of the database. This does not create the actual database, it +simply defines it to say that it exists.

-

I think this is fairly self explanatory. It is simply a list of subject -headers that we do not want to pass on to either the users of the cluster or -the other cluster nodes that we are linked to. This is usually because of -rules and regulations pertaining to items for sale etc in a particular country. +

+
+dbcreate <name> chain <name> [<name>...]
+
+
+

This creates a chained database entry. The first database will be +scanned, then the second, the third etc... +

+

+
+dbcreate <name> remote <name>
+
+
+

This creates a remote entry. the first name field is the database +name at the remote node, then the remote switch, then the actual +node_call of the remote node, for example... +

+

+
+dbcreate buckmaster remote gb7dxc
+
+
+

Remote databases cannot be chained, however, the last database in a +chain can be a remote database.

-

4.2 Filtering DX callouts (Depricated) +

4.2 Importing databases

-

From version 1.47, this method is replaced by the command set/baddx -

-

In the same way as mail, there are some types of spot we do not wish to pass on -to users or linked cluster nodes. In the /spider/data directory you will find -a file called baddx.pl.issue. Rename this to baddx.pl and edit the file. The -original looks like this .... +

The only databases that Spider can currently import are the standard +AK1A databases such as OBLAST or the DB0SDX qsl and address database. +This will be added to with time. +

To import such a database, first put the file somewhere useful like /tmp +and then issue the following command ...

-
-# the list of dx spot addresses that we don't store and don't pass on
-
-
-package DXProt;
-
-@baddx = qw 
-
- FROG 
- SALE
- FORSALE
- WANTED
- P1RATE
- PIRATE
- TEST
- DXTEST
- NIL
- NOCALL 
-);
+dbimport oblast /tmp/OBLAST.FUL
 
+

This will update the existing local oblast database or create it if +it does not exist.

-

Again, this is simply a list of names we do not want to see in the spotted -field of a DX callout. +

4.3 Checking available databases +

+ +

Once a database is created, you will want to check that it has been +added. To do this use the dbavail command. This will +output the available databases. For example ...

+

+
+dbavail
+DB Name          Location   Chain
+qsl              Local
+buck             GB7ADX
+hftest           GB7DXM
+G0VGS de GB7MBC  3-Feb-2001 1925Z >
+
+

-

4.3 Filtering words from text fields in Announce, Talk and DX spots +

4.4 Looking up databases

-

Create a file in /spider/data called badwords. The format is quite -simple. Lines beginning with # are ignored so comments can be added. An -example file is below ... +

To look for information in a defined database, simply use the dbshow +command, for example ...

-# Below is a list of words we do not wish to see on the cluster
-grunge grunged grunging
-splodge splodger splodging
-grince
-fluffle
+dbshow buckmaster G0YLM
 
-

Multiple words can be used on the same line as shown. Obviously these -are just examples :-) +

will show the information for the callsign G0YLM from the buckmaster +database if it exists. To make things more standard for the users +you can add an entry in the Aliases file so that it looks like a standard +show command like this ...

-

You can reload the file from the cluster prompt as sysop with load/badwords. +

+
+'^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
+
+
+

Now you can simply use show/buckmaster or an abreviation. +

+

4.5 Removing databases +

+ +

To delete an existing database you use the dbremove command. +For example ... +

+

+
+dbremove oblast
+
+
+

would remove the oblast database and its associated datafile from the +system. There are no warnings or recovery possible from this command. +If you remove a database it ceases to exist and would have to be created +from scratch if you still required it.


Next diff --git a/html/adminmanual-5.html b/html/adminmanual-5.html index 5fa2d87a..f047ba67 100644 --- a/html/adminmanual-5.html +++ b/html/adminmanual-5.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Mail + The DXSpider Administration Manual v1.48: Information, files and useful programs @@ -13,198 +13,333 @@ Previous Contents
-

5. Mail

- -

DXSpider deals seamlessly with standard AK1A type mail. It supports both -personal and bulletin mail and the sysop has additional commands to ensure -that mail gets to where it is meant. DXSpider will send mail almost -immediately, assuming that the target is on line. However, only one -mail message is dealt with at any one time. If a mail message is already -being sent or recieved, then the new message will be queued until it has -finished. -

The cluster mail is automatically deleted after 30 days unless the sysop -sets the "keep" flag using the msg command. -

-

5.1 Personal mail +

5. Information, files and useful programs

+ +

5.1 MOTD

-

Personal mail is sent using the sp command. This is actually the -default method of sending mail and so a simple s for send will do. -A full list of the send commands and options is in the command set -section, so I will not duplicate them here. +

One of the more important things a cluster sysop needs to do is to get +information to his users. The simplest way to do this is to have a banner +that is sent to the user on login. This is know as a "message of the day" +or "motd". To set this up, simply create a file in /spider/data called motd +and edit it to say whatever you want. It is purely a text file and will be +sent automatically to anyone logging in to the cluster.

-

5.2 Bulletin mail +

5.2 Downtime message

-

Bulletin mail is sent by using the sb command. This is one of the -most common mistakes users make when sending mail. They send a bulletin -mail with s or sp instead of sb and of course -the message never leaves the cluster. This can be rectified by the sysop -by using the msg command. -

-

Bulletin addresses can be set using the Forward.pl file. +

If for any reason the cluster is down, maybe for upgrade or maintenance but +the machine is still running, a message can be sent to the user advising them +of the fact. This message lives in the /spider/data directory and is called +"offline". Simply create the file and edit it to say whatever you wish. +This file will be sent to a user attempting to log into the cluster when +DXSpider is not actually running.

-

5.3 Forward.pl +

5.3 Other text messages

-

DXSpider receives all and any mail sent to it without any alterations needed -in files. Because personal and bulletin mail are treated differently, there -is no need for a list of accepted bulletin addresses. It is necessary, however, -to tell the program which links accept which bulletins. For example, it is -pointless sending bulletins addresses to "UK" to any links other than UK -ones. The file that does this is called forward.pl and lives in /spider/msg. -At default, like other spider files it is named forward.pl.issue. Rename it -to forward.pl and edit the file to match your requirements. -The format is below ... +

You can set other text messages to be read by the user if they input the file +name. This could be for news items or maybe information for new users. +To set this up, make a directory under /spider called packclus. +Under this directory you can create files called news or newuser +for example. In fact you can create files with any names you like. These can +be listed by the user with the command ....

-#
-# this is an example message forwarding file for the system
-#
-# The format of each line is as follows
-#
-#     type    to/from/at pattern action  destinations
-#     P/B/F     T/F/A     regex   I/F    [ call [, call ...] ]
-#
-# type: P - private, B - bulletin (msg), F - file (ak1a bull)
-# to/from/at: T - to field, F - from field, A - home bbs, O - origin 
-# pattern: a perl regex on the field requested
-# action: I - ignore, F - forward
-# destinations: a reference to an array containing node callsigns
-#
-# if it is non-private and isn't in here then it won't get forwarded 
-#
-# Currently only type B msgs are affected by this code.
-# 
-# The list is read from the top down, the first pattern that matches
-# causes the action to be taken.
-#
-# The pattern can be undef or 0 in which case it will always be selected
-# for the action specified
-#
-# If the BBS list is undef or 0 and the action is 'F' (and it matches the
-# pattern) then it will always be forwarded to every node that doesn't have 
-# it (I strongly recommend you don't use this unless you REALLY mean it, if
-# you allow a new link with this on EVERY bull will be forwarded immediately
-# on first connection)
-#
-
-package DXMsg;
-
-@forward = (
-'B',    'T',    'LOCAL',        'F',    [ qw(GB7MBC) ],
-'B',    'T',    'ALL',          'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'UK',           'F',    [ qw(GB7BAA GB7ADX) ],
-'B',    'T',    'QSL',          'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'QSLINF',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'DX',           'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'DXINFO',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'DXNEWS',       'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'DXQSL',        'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-'B',    'T',    'SYSOP',        'F',    [ qw(GB7BAA GB7ADX) ],
-'B',    'T',    '50MHZ',        'F',    [ qw(GB7BAA GB7ADX PA4AB-14) ],
-);
+show/files
 
-

Simply insert a bulletin address and state in the brackets where you wish -that mail to go. For example, you can see here that mail sent to "UK" will -only be sent to the UK links and not to PA4AB-14. +

They can be read by the user by typing the command ....

-

To force the cluster to reread the file use load/forward +

+
+type news
+
+
+

If the file they want to read is called news. You could also set +an alias for this in the Alias file to allow them just to type news

+

You can also store other information in this directory, either directly or +nested under directories. One use for this would be to store DX bulletins +such as the OPDX bulletins. These can be listed and read by the user. +To keep things tidy, make a directory under /spider/packclus called +bulletin. Now copy any OPDX or similar bulletins into it. These +can be listed by the user in the same way as above using the show/files +command with an extension for the bulletin directory you have just created, +like this ....

-

5.4 The msg command -

- -

The msg command is a very powerful and flexible tool for the -sysop. It allows the sysop to alter to and from fields and make other -changes to manage the cluster mail. -

Here is a full list of the various options ... +

+
+show/files bulletin
+
+
+

+

An example would look like this .... +

+

+
+sh/files
+bulletin      DIR 20-Dec-1999 1715Z news          1602 14-Dec-1999 1330Z
+
+
+

You can see that in the files area (basically the packclus directory) there is a +file called news and a directory called bulletin. You can +also see that dates they were created. In the case of the file news, +you can also see the time it was last modified, a good clue as to whether the +file has been updated since you last read it. To read the file called +news you would simply issue the command .... +

+

+
+type news
+
+
+

To look what is in the bulletin directory you issue the command .... +

+

+
+show/files bulletin
+opdx390      21381 29-Nov-1999 1621Z opdx390.1     1670 29-Nov-1999 1621Z
+opdx390.2     2193 29-Nov-1999 1621Z opdx391      25045 29-Nov-1999 1621Z  
+opdx392      35969 29-Nov-1999 1621Z opdx393      15023 29-Nov-1999 1621Z  
+opdx394      33429 29-Nov-1999 1621Z opdx394.1     3116 29-Nov-1999 1621Z  
+opdx395      24319 29-Nov-1999 1621Z opdx396      32647 29-Nov-1999 1621Z
+opdx396.1     5537 29-Nov-1999 1621Z opdx396.2     6242 29-Nov-1999 1621Z
+opdx397      18433 29-Nov-1999 1621Z opdx398      19961 29-Nov-1999 1621Z  
+opdx399      17719 29-Nov-1999 1621Z opdx400      19600 29-Nov-1999 1621Z
+opdx401      27738 29-Nov-1999 1621Z opdx402      18698 29-Nov-1999 1621Z
+opdx403      24994 29-Nov-1999 1621Z opdx404      15685 29-Nov-1999 1621Z
+opdx405      13984 29-Nov-1999 1621Z opdx405.1     4166 29-Nov-1999 1621Z
+opdx406      28934 29-Nov-1999 1621Z opdx407      24153 29-Nov-1999 1621Z
+opdx408      15081 29-Nov-1999 1621Z opdx409      23234 29-Nov-1999 1621Z
+Press Enter to continue, A to abort (16 lines) >
+
+
+

You can now read any file in this directory using the type command, like this ....

-  MSG TO <msgno> <call>     - change TO callsign to <call>
-  MSG FRom <msgno> <call>   - change FROM callsign to <call>
-  MSG PRrivate <msgno>      - set private flag
-  MSG NOPRrivate <msgno>    - unset private flag
-  MSG RR <msgno>            - set RR flag
-  MSG NORR <msgno>          - unset RR flag
-  MSG KEep <msgno>          - set the keep flag (message won't be deleted ever)
-  MSG NOKEep <msgno>        - unset the keep flag
-  MSG SUbject <msgno> <new> - change the subject to <new>
-  MSG WAittime <msgno>      - remove any waiting time for this message
-  MSG NOREad <msgno>        - mark message as unread
-  MSG REad <msgno>          - mark message as read
-  MSG QUeue                 - queue any outstanding bulletins
-  MSG QUeue 1               - queue any outstanding private messages
+type bulletin/opdx391
+Ohio/Penn DX Bulletin No. 391
+The Ohio/Penn Dx PacketCluster
+DX Bulletin No. 391
+BID: $OPDX.391
+January 11, 1999
+Editor Tedd Mirgliotta, KB8NW
+Provided by BARF-80 BBS Cleveland, Ohio
+Online at 440-237-8208 28.8k-1200 Baud 8/N/1 (New Area Code!)
+Thanks to the Northern Ohio Amateur Radio Society, Northern Ohio DX
+Association, Ohio/Penn PacketCluster Network, K1XN & Golist, WB2RAJ/WB2YQH
+& The 59(9) DXReport, W3UR & The Daily DX, K3TEJ, KN4UG, W4DC, NC6J, N6HR,
+Press Enter to continue, A to abort (508 lines) >
 
-

These commands are simply typed from within the cluster as the sysop user. +

The page length will of course depend on what you have it set to!

-

5.5 Message status +

5.4 The Aliases file

-

You can check on a message from within the cluster by using the command -stat/msg. This will give you additional information on the -message number including which nodes have received it, which node it -was received from and when etc. Here is an example of the output of -the command ... +

You will find a file in /spider/cmd/ called Aliases. First, copy this file to +/spider/local_cmd/Aliases and edit this file. You will see something like this ...

-G0VGS de GB7MBC 28-Jan-2001 1308Z >
-stat/msg 6869
-        From: GB7DJK
-    Msg Time: 26-Jan-2001 1302Z
-       Msgno: 6869
-      Origin: GB7DJK
-        Size: 8012
-     Subject: AMSAT 2line KEPS 01025.AMSAT
-          To: UK
-Got it Nodes: GB7BAA, GB7ADX
-     Private: 0
-Read Confirm: 0
-  Times read: 0
-G0VGS de GB7MBC 28-Jan-2001 1308Z >
+
+#!/usr/bin/perl
+
+# provide some standard aliases for commands for terminally
+# helpless ak1a user (helpless in the sense that they never
+# read nor understand help files)
+
+# This file is automagically reloaded if its modification time is 
+# later than the one stored in CmdAlias.pm
+
+# PLEASE make this file consistant with reality! (the patterns MUST
+# match the filenames!)
+
+# Don't alter this file, copy it into the local_cmd tree and modify it.
+# This file will be replaced everytime I issue a new release.
+
+# You only need to put aliases in here for commands that don't work as
+# you desire naturally, e.g sh/dx on its own just works as you expect
+# so you need not add it as an alias.
+
+
+
+package CmdAlias;
+
+%alias = (
+    '?' => [
+          '^\?', 'apropos', 'apropos',
+        ],
+    'a' => [
+          '^ann.*/full', 'announce full', 'announce', 
+          '^ann.*/sysop', 'announce sysop', 'announce',
+          '^ann.*/(.*)$', 'announce $1', 'announce',
+        ],
+        'b' => [
+        ],
+        'c' => [
+        ],
+        'd' => [
+          '^del', 'kill', 'kill',
+          '^del\w*/fu', 'kill full', 'kill',
+          '^di\w*/a\w*', 'directory all', 'directory',
+          '^di\w*/b\w*', 'directory bulletins', 'directory',
+          '^di\w*/n\w*', 'directory new', 'directory',
+          '^di\w*/o\w*', 'directory own', 'directory',
+          '^di\w*/s\w*', 'directory subject', 'directory',
+          '^di\w*/t\w*', 'directory to', 'directory',
+          '^di\w*/f\w*', 'directory from', 'directory',
+          '^di\w*/(\d+)', 'directory $1', 'directory',
+        ],
+        'e' => [
+        ],
+        'f' => [
+        ],
+        'g' => [
+        ],
+        'h' => [
+        ],
+        'i' => [
+        ],
+        'j' => [
+        ],
+        'k' => [
+        ],
+        'l' => [
+          '^l$', 'directory', 'directory',
+          '^ll$', 'directory', 'directory',
+          '^ll/(\d+)', 'directory $1', 'directory',
+        ],
+        'm' => [
+        ],
+        'n' => [
+          '^news', 'type news', 'type',
+        ],
+        'o' => [
+        ],
+        'p' => [
+        ],
+        'q' => [
+          '^q', 'bye', 'bye',
+        ],
+        'r' => [        
+          '^r$', 'read', 'read',
+          '^rcmd/(\S+)', 'rcmd $1', 'rcmd',
+        ],
+        's' => [
+          '^s/p$', 'send', 'send',
+          '^sb$', 'send noprivate', 'send',
+          '^set/home$', 'set/homenode', 'set/homenode',
+          '^set/nobe', 'unset/beep', 'unset/beep',
+          '^set/nohe', 'unset/here', 'unset/here',
+          '^set/noan', 'unset/announce', 'unset/announce',
+          '^set/nodx', 'unset/dx', 'unset/dx',
+          '^set/nota', 'unset/talk', 'unset/talk',
+          '^set/noww', 'unset/wwv', 'unset/wwv',
+          '^set/nowx', 'unset/wx', 'unset/wx',
+          '^sh$', 'show', 'show',
+          '^sh\w*/buck', 'dbshow buck', 'dbshow',
+          '^sh\w*/bu', 'show/files bulletins', 'show/files',
+          '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration',
+          '^sh\w*/c$', 'show/configuration', 'show/configuration',
+          '^sh\w*/com', 'dbavail', 'dbavail',
+          '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
+          '^sh\w*/dx/(\d+)', 'show/dx $1', 'show/dx',
+          '^sh\w*/dx/d(\d+)', 'show/dx from $1', 'show/dx',
+          '^sh\w*/email', 'dbshow email', 'dbshow',
+          '^sh\w*/hftest', 'dbshow hftest', 'dbshow',
+          '^sh\w*/vhftest', 'dbshow vhftest', 'dbshow',
+          '^sh\w*/qsl', 'dbshow qsl', 'dbshow',
+          '^sh\w*/tnc', 'who', 'who',
+          '^sh\w*/up', 'show/cluster', 'show/cluster',
+          '^sh\w*/w\w*/(\d+)-(\d+)', 'show/wwv $1-$2', 'show/wwv',
+          '^sh\w*/w\w*/(\d+)', 'show/wwv $1', 'show/wwv',
+          '^sp$', 'send', 'send',
+        
+    ],
+        't' => [
+          '^ta$', 'talk', 'talk',
+          '^t$', 'talk', 'talk',
+        ],
+        'u' => [
+        ],
+        'v' => [
+        ],
+        'w' => [
+          '^wx/full', 'wx full', 'wx',
+          '^wx/sysop', 'wx sysop', 'wx',
+        ],
+        'x' => [
+        ],
+        'y' => [
+        ],
+        'z' => [
+        ],
+)
 
+

You can create aliases for commands at will. Beware though, these may not +always turn out as you think. Care is needed and you need to test the +results once you have set an alias.

-

5.6 Filtering mail +

5.5 Console.pl

-

This is described in the section on Other filters so I will not -duplicate it here. +

In later versions of Spider a simple console program is provided for the sysop. +This has a type ahead buffer with line editing facilities and colour for spots, +announces etc. To use this program, simply use console.pl instead of client.

-

5.7 Distribution lists +

To edit the colours, copy /spider/perl/Console.pl to /spider/local and edit the +file with your favourite editor. +

+

5.6 Updating kepler data

-

Distribution lists are simply a list of users to send certain types of -mail to. An example of this is mail you only wish to send to other -sysops. In /spider/msg there is a directory called distro. You -put any distibution lists in here. For example, here is a file called -SYSOP.pl that caters for the UK sysops. +

Spider has a powerful and flexible show/satellite command. In order for +this to be accurate, the kepler data has to be updated regularly. In +general, this data is available as an email or via cluster mail. +Updating it is simple. First you need to export the mail message as a +file. You do this with the export command from the cluster prompt +as the sysop. For example ... +

+

+
+export 5467 /spider/perl/keps.in
+
+
+

would export message number 5467 as a file called keps.in in the +/spider/perl directory. +

Now login to a VT as sysop and cd /spider/perl. There is a command in +the perl directory called convkeps.pl. All we need to do now is +convert the file like so ...

-qw(GB7TLH GB7DJK GB7DXM GB7CDX GB7BPQ GB7DXN GB7MBC GB7MBC-6 GB7MDX
-   GB7NDX GB7SDX GB7TDX GB7UDX GB7YDX GB7ADX GB7BAA GB7DXA GB7DXH 
-   GB7DXK GB7DXI GB7DXS)
+./convkeps.pl keps.in
 
-

Any mail sent to "sysop" would only be sent to the callsigns in this list. +

Now go back to the cluster and issue the command ...

-

5.8 BBS interface +
+
+load/keps
+
+
+

That is it! the kepler data has been updated. +

+

5.7 The QRZ callbook

-

Spider provides a simple BBS interface. No input is required from the sysop -of the cluster at all. The BBS simply sets the cluster as a BBS and pushes -any required mail to the cluster. No mail can flow from Spider to the BBS, -the interface is one-way. -

-

Please be careful not to flood the cluster network with unnecessary mail. -Make sure you only send mail to the clusters that want it by using the -Forward.pl file very carefully. +

The command sh/qrz will only work once you have followed a few +simple steps. First you need to get a user ID and password from qrz.com. +Simply go to the site and create one. Secondly you need to copy the file +/spider/perl/Internet.pm to /spider/local and alter it to match your user +ID and password. You also at this point need to set $allow=1 to complete +the setup. Many thanks to Fred Lloyd, the proprieter of +qrz.com for allowing this access.


Next diff --git a/html/adminmanual-6.html b/html/adminmanual-6.html index ee7c7bff..313fa913 100644 --- a/html/adminmanual-6.html +++ b/html/adminmanual-6.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Databases + The DXSpider Administration Manual v1.48: CVS @@ -13,129 +13,98 @@ Previous Contents
-

6. Databases

+

6. CVS

-

Spider allows the creation of local or remote databases. It supports -chained databases, allowing several different databases to be scanned -with one simple command. Importing of databases is limited at present -to the standard AK1A databases such as OBLAST and the DB0SDX QSL -database but will expand with time. -

-

6.1 Creating databases -

- -

Creating a database could not be more simple. All the commands are -sent from the cluster prompt as the sysop user. -

To create a database you use the command dbcreate. It can -be used in 3 different ways like so .. +

CVS stands for "Concurrent Versions System" and the CVS for DXSpider is held +at +Sourceforge. This means +that it is possible to update your DXSpider installation to the latest +sources by using a few simple commands.

-

-
-dbcreate <name>
-
-
-

To simply create a database locally, you just tell the command the -name of the database. This does not create the actual database, it -simply defines it to say that it exists. +

THIS IS NOT FOR THE FAINT HEARTED!!! ONLY DO THIS IF YOU HAVE A TEST +INSTALLATION OR ARE WILLING TO HAVE YOUR CLUSTER CRASH ON YOU!!! +THIS MUST BE CONSIDERED AT LEAST BETA TESTING AND MAYBE EVEN ALPHA!! +YOU HAVE BEEN WARNED!!!

-

-
-dbcreate <name> chain <name> [<name>...]
-
-
-

This creates a chained database entry. The first database will be -scanned, then the second, the third etc... +

DID I MENTION..... ONLY DO THIS IF YOU ARE WILLING TO ACCEPT THE +CONSEQUENCES!!!

-

-
-dbcreate <name> remote <name>
-
-
-

This creates a remote entry. the first name field is the database -name at the remote node, then the remote switch, then the actual -node_call of the remote node, for example... +

I am of course assuming that you have a machine with both DXSpider and +Internet access running.

-

-
-dbcreate buckmaster remote gb7dxc
-
-
-

Remote databases cannot be chained, however, the last database in a -chain can be a remote database. +

BEFORE YOU EVEN CONSIDER STARTING WITH THIS MAKE A BACKUP OF YOUR +ENTIRE SPIDER TREE!!

-

6.2 Importing databases -

- -

The only databases that Spider can currently import are the standard -AK1A databases such as OBLAST or the DB0SDX qsl and address database. -This will be added to with time. -

To import such a database, first put the file somewhere useful like /tmp -and then issue the following command ... +

Assuming you are connected to the Internet, you need to login to the +CVS repository and then update your Spider source. There are several +steps which are listed below ... +

+

First login as the user sysop. Next you need to connect to the CVS +repository. You do this with the command below ...

-

-dbimport oblast /tmp/OBLAST.FUL
+cvs -d:pserver:anonymous@cvs.DXSpider.sourceforge.net:/cvsroot/dxspider login 
 
-
-

This will update the existing local oblast database or create it if -it does not exist. +

You will get a password prompt. Simply hit return here and your machine should +return to a normal linux prompt.

-

6.3 Checking available databases -

- -

Once a database is created, you will want to check that it has been -added. To do this use the dbavail command. This will -output the available databases. For example ... +

What happens next depends on whether you have an existing installation that +you want to update with the latest and greatest or whether you just want +to see what is there and/or run it on a new machine for testing. +

If you are installing Spider from CVS then change directory to /home/sysop +

If you are wanting to update Spider then cd to /tmp +

+

The next step will create a brand new 'spider' directory in your current +directory.

-

-dbavail
-DB Name          Location   Chain
-qsl              Local
-buck             GB7ADX
-hftest           GB7DXM
-G0VGS de GB7MBC  3-Feb-2001 1925Z >
+cvs -z3 -d:pserver:anonymous@cvs.DXSpider.sourceforge.net:/cvsroot/dxspider co spider
 
-
+

This command is all on one line.

-

6.4 Looking up databases -

- -

To look for information in a defined database, simply use the dbshow -command, for example ... +

Hopefully your screen should show you downloading files. The -z3 simply compresses +the download to improve speed. +When this has finished, you will have exactly the same as if you had untarred a full +tarball PLUS some extra directories and files that CVS needs to do the magic that +it does.

-

-
-dbshow buckmaster G0YLM
-
-
-

will show the information for the callsign G0YLM from the buckmaster -database if it exists. To make things more standard for the users -you can add an entry in the Aliases file so that it looks like a standard -show command like this ... +

Now if you are doing a new installation, that's it. Carry on as if you have +just downloaded and untarred the lastest tarball. +

+

If you want to upgrade your current installation then do this ...

-'^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
+tar cvfz /tmp/s.tgz spider
+cd /
+tar xvfzp /tmp/s.tgz
 
-

Now you can simply use show/buckmaster or an abreviation. +

This is assuming you downloaded to the /tmp directory of course.

-

6.5 Removing databases -

- -

To delete an existing database you use the dbremove command. -For example ... +

NOTE: the 'p' on the end of the 'xvfz' is IMPORTANT! It keeps the permissions +correct. YOU WERE LOGGED IN AS THE USER SYSOP WEREN'T YOU????? +

Remember to recompile the C client (cd /spider/src; make) +

+

At this point the files have been upgraded. You can (usually) restart the cluster +in your own time. However, if you attempt to use any new commands or features +expect it to be fatal! At least your cluster will have been restarted then so it +will be too late to worry about it! +

+

Now the magic part! From now on when you want to update, simply connect to the +Internet and then, as the user sysop ...

-dbremove oblast
+cd /spider
+cvs -z3 update -d
 
-

would remove the oblast database and its associated datafile from the -system. There are no warnings or recovery possible from this command. -If you remove a database it ceases to exist and would have to be created -from scratch if you still required it. +

and your files will be updated. As above, remember to recompile the "C" client +if it has been updated (CVS will tell you) and restart if any of the perl scripts +have been altered or added, again, CVS will tell you. +

+

You will find any changes documented in the /spider/Changes file.


Next diff --git a/html/adminmanual-7.html b/html/adminmanual-7.html index 2519d041..778127f1 100644 --- a/html/adminmanual-7.html +++ b/html/adminmanual-7.html @@ -2,347 +2,2361 @@ - The DXSpider Administration Manual v1.47: Information, files and useful programs - + The DXSpider Administration Manual v1.48: The DXSpider command set -Next +Next Previous Contents
-

7. Information, files and useful programs

+

7. The DXSpider command set

-

7.1 MOTD +

Below is a complete list of commands available from the cluster prompt. +Most maintenance tasks are automatic but there are some commands that are useful +for a sysop. These are listed below in alphabetical order. The number in +brackets following the command name is the permissions level needed to use +the command. +

+

7.1 accept/announce (0) +

+ +

accept/announce [0-9] <pattern> Set an accept filter +line for announce +

+

Create an 'accept this announce' line for a filter. +

An accept filter line means that if the announce matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  info <string>            eg: iota or qsl
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+  wx 1                     filter WX announces
+  dest <prefixes>          eg: 6MUK,WDX      (distros)
+
+
+

some examples:- +

+

+
+  acc/ann dest 6MUK
+  acc/ann 2 by_zone 14,15,16
+  (this could be all on one line: acc/ann dest 6MUK or by_zone 14,15,16)
+
+
+

or +

+

+
+  acc/ann by G,M,2 
+
+
+

This filter would only allow announces that were posted buy UK stations. +You can use the tag 'all' to accept everything eg: +

+

+
+  acc/ann all
+
+
+

but this probably for advanced users... +

+

7.2 accept/announce (extended for sysops) (8) +

+ +

accept/announce <call> [input] [0-9]<pattern> Announce filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/ann by G,M,2
+  accept/ann input node_default by G,M,2
+  accept/ann user_default by G,M,2
+
+
+

+

7.3 accept/route (8) +

+ +

accept/route <call> [0-9] <pattern> Set an 'accept' filter line for routing +

+

Create an 'accept this routing PC Protocol' line for a filter. +

+

An accept filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is passed thru that interface. See HELP FILTERING for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

+

You can use any of the following things in this line:- +

+

+
+  call <prefixes>        the callsign of the thingy
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  origin <prefixes>      really the interface it came in on
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+
+
+

+

some examples:- +

+

+
+  acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes)
+  acc/route gb7djk call gb7djk     (equiv to SET/ISOLATE)
+
+
+

+

You can use the tag 'all' to accept everything eg: +

+

+
+  acc/route all
+
+
+

+

7.4 accept/spots (0) +

+ +

accept/announce [0-9] <pattern> Set an accept filter line for spots +

+

Create an 'accept this spot' line for a filter. +

+

An accept filter line means that if the spot matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  freq <range>           eg: 0/30000 or hf or hf/cw or 6m,4m,2m
+  on <range>             same as 'freq'
+  call <prefixes>        eg: G,PA,HB9
+  info <string>          eg: iota or qsl
+  by <prefixes>            
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  origin <prefixes>
+  channel <prefixes>
+
+
+

+

For frequencies, you can use any of the band names defined in +SHOW/BANDS and you can use a subband name like: cw, rtty, data, ssb - +thus: hf/ssb. You can also just have a simple range like: 0/30000 - +this is more efficient than saying simply: freq HF (but don't get +too hung up about that) +

some examples:- +

+

+
+  acc/spot 1 on hf/cw
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

You can use the tag 'all' to accept everything, eg: +

+

+
+  acc/spot 3 all
+
+
+

but this probably for advanced users... +

+

7.5 accept/spots (extended for sysops) (8) +

+ +

accept/spots <call> [input] [0-9] <pattern> Spot filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/spot db0sue-7 1 by_zone 14,15,16
+  accept/spot node_default all
+  set/hops node_default 10
+
+  accept/spot user_default by G,M,2
+
+
+

+

7.6 accept/wcy (0) +

+ +

accept/wcy [0-9] <pattern> set an accept WCY filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

+

There are no examples because WCY Broadcasts only come from one place and +you either want them or not (see UNSET/WCY if you don't want them). +

This command is really provided for future use. +

See HELP FILTER for information. +

+

7.7 accept/wcy (extended for sysops) (8) +

+ +

accept/wcy <call> [input] [0-9] <pattern> +WCY filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/wcy node_default all
+  set/hops node_default 10
+
+
+

+

7.8 accept/wwv (0) +

+ +

accept/wwv [0-9] <pattern> Set an accept WWV filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

for example +

+

+
+  accept/wwv by_zone 4
+
+
+

is probably the only useful thing to do (which will only show WWV broadcasts +by stations in the US). +

See HELP FILTER for information. +

+

7.9 accept/wwv (extended for sysops) (8) +

+ +

accept/wwv <call> [input] [0-9] <pattern> +WWV filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/wwv db0sue-7 1 by_zone 4
+  accept/wwv node_default all
+  set/hops node_default 10
+
+  accept/wwv user_default by W,K
+
+
+

+

7.10 announce (0) +

+ +

announce <text> Send an announcement to local users +

+

Send an announcement to LOCAL users only, where <text> is the text +of the announcement you wish to broadcast. If you do not wish to receive +announces, use the set/noannounce command. Any announces made by +a sysop will override set/noannounce. +

+

7.11 announce full (0) +

+ +

announce full <text> Send an announcement cluster wide +

+

This command will send your announcement across the whole cluster +network. +

+

+

7.12 announce sysop (5) +

+ +

announce sysop <text> +

+

Send an announcement to Sysops only +

+

7.13 apropos (0) +

+ +

apropos <string> Search the help database +

+

Search the help database for <string> (it isn't case sensitive), +and print the names of all the commands that may be relevant. +

+

7.14 bye (0) +

+ +

bye Exit from the cluster +

+

This will disconnect you from the cluster +

+

7.15 catchup (5) +

+ +

catchup <node_call> All|[<msgno> ...] Mark a message as sent +

+

When you send messages the fact that you have forwarded it to another node +is remembered so that it isn't sent again. When you have a new partner +node and you add their callsign to your /spider/msg/forward.pl file, all +outstanding non-private messages will be forwarded to them. This may well +be ALL the non-private messages. You can prevent this by using these +commmands:- +

+

+
+  catchup GB7DJK all
+  catchup GB7DJK 300 301 302 303 500-510
+
+
+

and to undo what you have just done:- +

+

+
+  uncatchup GB7DJK all
+  uncatchup GB7DJK 300 301 302 303 500-510
+
+
+

which will arrange for them to be forward candidates again. +

Order is not important. +

+

7.16 clear/spots (0) +

+ +

clear/spots [1|all] Clear a spot filter line +

+

This command allows you to clear (remove) a line in a spot filter or to +remove the whole filter. +

If you have a filter:- +

+

+
+  acc/spot 1 on hf/cw
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

and you say:- +

+

+
+  clear/spot 1
+
+
+

you will be left with:- +

+

+
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

If you do: +

+

+
+  clear/spot all
+
+
+

the filter will be completely removed. +

+

+

7.17 connect (5) +

+ +

connect <callsign> Start a connection to another DX Cluster +

+

Start a connection process that will culminate in a new connection to the +DX cluster <callsign>. This process creates a new 'client' process which will +use the script in /spider/connect/<callsign> to effect the 'chat' exchange +necessary to traverse the network(s) to logon to the cluster <callsign>. +

+

7.18 dbavail (0) +

+ +

dbavail Show a list of all the databases in the system +

+

The title says it all really, this command lists all the databases defined +in the system. It is also aliased to SHOW/COMMAND. +

+

7.19 dbcreate (9) +

+ +

dbcreate <name> Create a database entry
+dbcreate <name> chain <name> [<name>..] Create a chained database entry
+dbcreate <name> remote <node> Create a remote database +entry
+

+

DBCREATE allows you to define a database in the system. It doesn't actually +create anything, just defines it. +

The databases that are created are simple DB_File hash databases, they are +therefore already 'indexed'. +

You can define a local database with the first form of the command eg: +

DBCREATE oblast +

You can also chain databases with the addition of the 'chain' keyword. +This will search each database one after the other. A typical example +is: +

DBCREATE sdx_qsl chain sql_ad +

No checking is done to see if the any of the chained databases exist, in +fact it is usually better to do the above statement first then do each of +the chained databases. +

Databases can exist offsite. To define a database that lives on another +node do: +

DBCREATE buckmaster remote gb7dxc +

Remote databases cannot be chained; however, the last database in a +a chain can be a remote database eg: +

DBCREATE qsl chain gb7dxc +

To see what databases have been defined do: +

DBAVAIL (or it will have been aliased to SHOW/COMMAND) +

It would be normal for you to add an entry into your local Aliases file +to allow people to use the 'SHOW/<dbname>' style syntax. So you would +need to add a line like:- +

+

+
+  's' => [
+    ..
+    ..
+    '^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
+    ..
+    ..
+   ],
+
+
+

to allow +

SH/BUCK g1tlh +

to work as they may be used to. +

See DBIMPORT for the importing of existing AK1A format data to databases. +See DBSHOW for generic database enquiry +

+

7.20 dbimport (9) +

+ +

dbimport <dbname> Import AK1A data into a database +

+

If you want to import or update data in bulk to a database you can use +this command. It will either create or update entries into an existing +database. For example:- +

DBIMPORT oblast /tmp/OBLAST.FUL +

will import the standard OBLAST database that comes with AK1A into the +oblast database held locally. +

+

7.21 dbremove (9) +

+ +

dbremove <dbname> Delete a database +

+

DBREMOVE will completely remove a database entry and also delete any data +file that is associated with it. +

There is no warning, no comeback, no safety net. +

For example: +

DBREMOVE oblast +

will remove the oblast database from the system and it will also remove +the associated datafile. +

I repeat: +

There is no warning, no comeback, no safety net. +

You have been warned. +

+

7.22 dbshow (0) +

+ +

dbshow <dbname> <key> Display an entry, if it exists, in a database +

+

This is the generic user interface to the database to the database system. +It is expected that the sysop will add an entry to the local Aliases file +so that users can use the more familiar AK1A style of enquiry such as: +

+

+
+  SH/BUCK G1TLH
+
+
+

but if he hasn't and the database really does exist (use DBAVAIL or +SHOW/COMMAND to find out) you can do the same thing with: +

+

+
+  DBSHOW buck G1TLH
+
+
+

+

+

7.23 debug (9) +

+ +

debug Set the cluster program into debug mode +

+

Executing this command will only have an effect if you are running the cluster +in debug mode i.e. +

+

+
+        perl -d cluster.pl
+
+
+

It will interrupt the cluster just after the debug command has finished. +

+

7.24 directory (0) +

+ +

directory List messages
directory all List all messages
+directory own List your own messages
+directory new List all new messages
+directory to <call> List all messages to <call>
+directory from <call> List all messages from <call>
+directory subject <string> List all messages with <string> in subject
+directory <nn> List last <nn> messages
+directory <from>-<to> List messages <from> message <to> message
+

+

List the messages in the messages directory. +

If there is a 'p' one space after the message number then it is a +personal message. If there is a '-' between the message number and the +'p' then this indicates that the message has been read. +

You can use shell escape characters such as '*' and '?' in the <call> +fields. +

You can combine some of the various directory commands together eg:- +

+

+
+   DIR TO G1TLH 5
+or 
+   DIR SUBJECT IOTA 200-250
+
+
+

You can abbreviate all the commands to one letter and use ak1a syntax:- +

+

+
+   DIR/T G1* 10
+   DIR/S QSL 10-100 5
+
+
+

+

+

7.25 directory (extended for sysops) (5) +

+ +

Works just like the user command except that sysops can see ALL messages. +

+

7.26 disconnect (8) +

+ +

disconnect <call> [<call> ...] Disconnect a user or node +

+

Disconnect any <call> connected locally +

+

7.27 dx (0) +

+ +

dx [by <call>] <freq> <call> <remarks> Send a DX spot +

+

This is how you send a DX Spot to other users. You can, in fact, now +enter the <freq> and the <call> either way round. +

+

+
+   DX FR0G 144.600
+   DX 144.600 FR0G
+   DX 144600 FR0G 
+
+
+

will all give the same result. You can add some remarks to the end +of the command and they will be added to the spot. +

+

+
+   DX FR0G 144600 this is a test
+
+
+

You can credit someone else by saying:- +

+

+
+   DX by G1TLH FR0G 144.600 he isn't on the cluster
+
+
+

The <freq> is compared against the available bands set up in the +cluster. See SHOW/BANDS for more information. +

+

7.28 export (9) +

+ +

export <msgno> <filename> Export a message to a file +

+

Export a message to a file. This command can only be executed on a local +console with a fully privileged user. The file produced will be in a form +ready to be imported back into the cluster by placing it in the import +directory (/spider/msg/import). +

This command cannot overwrite an existing file. This is to provide some +measure of security. Any files written will owned by the same user as the +main cluster, otherwise you can put the new files anywhere the cluster can +access. For example:- +

EXPORT 2345 /tmp/a +

+

7.29 export_users (9) +

+ +

export_users [<filename>] Export the users database to ascii +

+

Export the users database to a file in ascii format. If no filename +is given then it will export the file to /spider/data/user_asc. +

If the file already exists it will be renamed to <filename>.o. In fact +up to 5 generations of the file can be kept each one with an extra 'o' on the +suffix. +

BE WARNED: this will write to any file you have write access to. No check is +made on the filename (if any) that you specify. +

+

7.30 forward/latlong (8) +

+ +

forward/latlong <node_call> Send latitude and longitude information to another cluster +

+

This command sends all the latitude and longitude information that your +cluster is holding against callsigns. One advantage of recieving this +information is that more locator information is held by you. This +means that more locators are given on the DX line assuming you have +set/dxgrid enabled. This could be a LOT of information though, so +it is not recommended on slow links. +

+

7.31 forward/opername (1) +

+ +

forward/opername <call> Send out information on this <call> to all clusters +

+

This command sends out any information held in the user file which can +be broadcast in PC41 protocol packets. This information is Name, QTH, Location +and Homenode. PC41s are only sent for the information that is available. +

+

7.32 help (0) +

+ +

help <cmd> Get help on a command +

+

All commands can be abbreviated, so SHOW/DX can be abbreviated +to SH/DX, ANNOUNCE can be shortened to AN and so on. +

Look at the APROPOS <string> command which will search the help database +for the <string> you specify and give you a list of likely commands +to look at with HELP. +

+

7.33 init (5) +

+ +

init <node call> Re-initialise a link to an AK1A compatible node +

+

This command attempts to re-initialise a link to a (usually) AK1A node +that has got confused, usually by a protocol loop of some kind. It may +work - but you usually will be better off simply disconnecting it (or +better, if it is a real AK1A node, doing an RCMD <node> DISC/F <your +node>). +

Best of luck - you will need it. +

+

7.34 kill (0) +

+ +

kill <msgno> [<msgno> ..] Delete a message from the local system +

+

Delete a message from the local system. You will only be able to +delete messages that you have originated or been sent (unless you are +the sysop). +

+

7.35 kill (5) +

+ +

kill <msgno> [<msgno> ...] Remove or erase a message from the system
+kill from <call> Remove all messages from a callsign
+kill to <call> Remove all messages to a callsign
+

+

You can get rid of any message to or originating from your callsign using +this command. You can remove more than one message at a time. +

As a sysop you can kill any message on the system. +

+

7.36 kill full (5) +

+ +

kill full <msgno> [<msgno>] Delete a message from the whole cluster +

+

Delete a message (usually a 'bulletin') from the whole cluster system. +

This uses the subject field, so any messages that have exactly the same subject +will be deleted. Beware! +

+

7.37 links (0) +

+ +

links Show which nodes are physically connected +

+

This is a quick listing that shows which links are connected and +some information about them. See WHO for a list of all connections. +

+

+

7.38 load/aliases (9) +

+ +

load/aliases Reload the command alias table +

+

Reload the /spider/cmd/Aliases file after you have editted it. You will need to +do this if you change this file whilst the cluster is running in order for the +changes to take effect. +

+

+

7.39 load/baddx (9) +

+ +

load/baddx Reload the bad DX table +

+

Reload the /spider/data/baddx.pl file if you have changed it manually whilst +the cluster is running. This table contains the DX Calls that, if spotted, +will not be passed on. FR0G and TEST are classic examples. +

+

7.40 load/badmsg (9) +

+ +

load/badmsg Reload the bad message table +

+

Reload the /spider/msg/badmsg.pl file if you have changed it manually whilst +the cluster is running. This table contains a number of perl regular +expressions which are searched for in the fields targetted of each message. +If any of them match then that message is immediately deleted on receipt. +

+

7.41 load/badwords (9) +

+ +

load/badwords Reload the badwords file +

+

Reload the /spider/data/badwords file if you have changed it manually whilst +the cluster is running. This file contains a list of words which, if found +on certain text portions of PC protocol, will cause those protocol frames +to be rejected. It will all put out a message if any of these words are +used on the announce, dx and talk commands. The words can be one or +more on a line, lines starting with '#' are ignored. +

+

7.42 load/bands (9) +

+ +

load/bands Reload the band limits table +

+

Reload the /spider/data/bands.pl file if you have changed it manually whilst +the cluster is running. +

+

7.43 load/cmd_cache (9) +

+ +

load/cmd_cache Reload the automatic command cache +

+

Normally, if you change a command file in the cmd or local_cmd tree it will +automatially be picked up by the cluster program. Sometimes it can get confused +if you are doing a lot of moving commands about or delete a command in the +local_cmd tree and want to use the normal one again. Execute this command to +reset everything back to the state it was just after a cluster restart. +

+

7.44 load/forward (9) +

+ +

load/forward Reload the msg forwarding routing table +

Reload the /spider/msg/forward.pl file if you have changed it +manually whilst the cluster is running. +

+

7.45 load/messages (9) +

+ +

load/messages Reload the system messages file +

+

If you change the /spider/perl/Messages file (usually whilst fiddling/writing ne +commands) you can have them take effect during a cluster session by executing this +command. You need to do this if get something like :- +

unknown message 'xxxx' in lang 'en' +

+

7.46 load/prefixes (9) +

+ +

load/prefixes Reload the prefix table +

+

Reload the /spider/data/prefix_data.pl file if you have changed it manually +whilst the cluster is running. +

+

7.47 merge (5) +

+ +

merge <node> [<no spots>/<no wwv>] Ask for the latest spots and WWV +

+

MERGE allows you to bring your spot and wwv database up to date. By default +it will request the last 10 spots and 5 WWVs from the node you select. The +node must be connected locally. +

You can request any number of spots or wwv and although they will be appended +to your databases they will not duplicate any that have recently been added +(the last 2 days for spots and last month for WWV data). +

+

7.48 msg (9) +

+ +

msg <cmd> <msgno> [data ...] Alter various message parameters +

+

Alter message parameters like To, From, Subject, whether private or bulletin +or return receipt (RR) is required or whether to keep this message from timing +out. +

+

+
+  MSG TO <msgno> <call>     - change TO callsign to <call>
+  MSG FRom <msgno> <call>   - change FROM callsign to <call>
+  MSG PRrivate <msgno>      - set private flag
+  MSG NOPRrivate <msgno>    - unset private flag
+  MSG RR <msgno>            - set RR flag
+  MSG NORR <msgno>          - unset RR flag
+  MSG KEep <msgno>          - set the keep flag (message won't be deleted ever)
+  MSG NOKEep <msgno>        - unset the keep flag
+  MSG SUbject <msgno> <new> - change the subject to <new>
+  MSG WAittime <msgno>      - remove any waitting time for this message
+  MSG NOREad <msgno>        - mark message as unread
+  MSG REad <msgno>          - mark message as read
+  MSG QUeue                 - queue any outstanding bulletins
+  MSG QUeue 1               - queue any outstanding private messages
+
+
+

You can look at the status of a message by using:- +

STAT/MSG <msgno> +

This will display more information on the message than DIR does. +

+

7.49 pc (8) +

+ +

pc <call> <text> Send text (eg PC Protocol) to <call> +

+

Send some arbitrary text to a locally connected callsign. No processing is done on +the text. This command allows you to send PC Protocol to unstick things if problems +arise (messages get stuck etc). eg:- +

pc gb7djk PC33^GB7TLH^GB7DJK^400^ +

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. +

pc G1TLH Try doing that properly!!! +

+

7.50 ping (1) +

+ +

ping <node> Check the link quality between nodes +

+

his command allows you to send a frame to another cluster node on +the network and get a return frame. The time it takes to do this +is a good indication of the quality of the link. The actual time +it takes is output to the console in seconds. +Any visible cluster node can be PINGed. +

+

+

7.51 rcmd (1) +

+ +

rcmd <node call> <cmd> Send a command to another DX cluster +

+

This command allows you to send nearly any command to another DX Cluster +node that is connected to the system. +

Whether you get any output is dependant on a) whether the other system knows +that the node callsign of this cluster is in fact a node b) whether the +other system is allowing RCMDs from this node and c) whether you have +permission to send this command at all. +

+

7.52 read (0) +

+ +

read Read the next unread personal message addressed to you
+read <msgno> Read the specified message
+

+

You can read any messages that are sent as 'non-personal' and also any +message either sent by or sent to your callsign. +

+

+

7.53 read (extended for sysops) (5) +

+ +

read <msgno> Read a message on the system +

+

As a sysop you may read any message on the system +

+

7.54 reject/announce +

+ +

reject/announce [0-9] <pattern> Set a reject filter +for announce +

+

Create an 'reject this announce' line for a filter. +

An reject filter line means that if the announce matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  info <string>            eg: iota or qsl
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+  wx 1                     filter WX announces
+  dest <prefixes>          eg: 6MUK,WDX      (distros)
+
+
+

some examples:- +

+

+
+  rej/ann by_zone 14,15,16 and not by G,M,2
+
+
+

You can use the tag 'all' to reject everything eg: +

+

+
+  rej/ann all
+
+
+

but this probably for advanced users... +

+

7.55 reject/announce (extended for sysops) (8) +

+ +

reject/announce <call> [input] [0-9] <pattern> Announce filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/ann by G,M,2
+  reject/ann input node_default by G,M,2
+  reject/ann user_default by G,M,2
+
+
+

+

7.56 reject/route (8) +

+ +

reject/route <call> [0-9] <pattern> Set an 'reject' filter line for routing +

+

Create an 'reject this routing PC Protocol' line for a filter. +

+

An reject filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is NOT passed thru that interface. See HELP FILTERING for more info. Please +read this to understand how filters work - it will save a lot of grief later on. +You can use any of the following things in this line:- +

+

+
+  call <prefixes>        the callsign of the thingy
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  origin <prefixes>      really the interface it came in on
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+
+
+

+

some examples:- +

+

+
+  rej/route gb7djk call_dxcc 61,38 (everything except  UK+EIRE nodes)
+
+
+

+

You can use the tag 'all' to reject everything eg: +

+

+
+  rej/route all     (equiv to [very] restricted mode)
+
+
+

+

7.57 reject/spots (0) +

+ +

reject/spots [0-9] <pattern> Set a reject filter line for spots +

+

Create a 'reject this spot' line for a filter. +

A reject filter line means that if the spot matches this filter it is +dumped (not passed on). See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  freq <range>           eg: 0/30000 or hf or hf/cw or 6m,4m,2m
+  on <range>             same as 'freq'
+  call <prefixes>        eg: G,PA,HB9
+  info <string>          eg: iota or qsl
+  by <prefixes>            
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  origin <prefixes>
+  channel <prefixes>
+
+
+

For frequencies, you can use any of the band names defined in +SHOW/BANDS and you can use a subband name like: cw, rtty, data, ssb - +thus: hf/ssb. You can also just have a simple range like: 0/30000 - +this is more efficient than saying simply: on HF (but don't get +too hung up about that) +

some examples:- +

+

+
+  rej/spot 1 on hf
+  rej/spot 2 on vhf and not (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

You can use the tag 'all' to reject everything eg: +

+

+
+  rej/spot 3 all
+
+
+

but this probably for advanced users... +

+

7.58 reject/spots (extended for sysops) (8) +

+ +

reject/spots <call> [input] [0-9] <pattern> +Reject spot filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/spot db0sue-7 1 by_zone 14,15,16
+  reject/spot node_default all
+  set/hops node_default 10
+
+  reject/spot user_default by G,M,2
+
+
+

+

7.59 reject/wcy (0) +

+ +

reject/wcy [0-9] <pattern> Set a reject WCY filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

There are no examples because WCY Broadcasts only come from one place and +you either want them or not (see UNSET/WCY if you don't want them). +

This command is really provided for future use. +

See HELP FILTER for information. +

+

7.60 reject/wcy (extended for sysops) (8) +

+ +

reject/wcy <call> [input] [0-9] <pattern> +WCY reject filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

reject/wcy gb7djk all +

+

7.61 reject/wwv (0) +

+ +

reject/wwv [0-9] <pattern> Set a reject WWV filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

for example +

+

+
+  reject/wwv by_zone 14,15,16
+
+
+

is probably the only useful thing to do (which will only show WWV broadcasts +by stations in the US). +

See HELP FILTER for information. +

+

7.62 reject/wwv (extended for sysops) (8) +

+ +

reject/wwv <call> [input] [0-9] <pattern> +WWV reject filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/wwv db0sue-7 1 by_zone 4
+  reject/wwv node_default all
+
+  reject/wwv user_default by W
+
+
+

+

7.63 reply (0) +

+ +

reply Reply (privately) to the last message that you have read
+reply <msgno> Reply (privately) to the specified message
+reply B <msgno> Reply as a Bulletin to the specified message
+reply NOPrivate <msgno> Reply as a Bulletin to the specified +message
+reply RR <msgno> Reply to the specified message with read receipt
+

+

You can reply to a message and the subject will automatically have +"Re:" inserted in front of it, if it isn't already present. +

You can also use all the extra qualifiers such as RR, PRIVATE, +NOPRIVATE, B that you can use with the SEND command (see SEND +for further details) +

+

7.64 send (0) +

+ +

send <call> [<call> ...] Send a message to one or more callsigns
+send RR <call> Send a message and ask for a read receipt
+send COPY <msgno> <call> Send a copy of a message to someone
+send PRIVATE <call> Send a personal message
+send NOPRIVATE <call> Send a message to all stations
+

+

All the SEND commands will create a message which will be sent either to +an individual callsign or to one of the 'bulletin' addresses. +

SEND <call> on its own acts as though you had typed SEND PRIVATE, that is +it will mark the message as personal and send it to the cluster node that +that callsign is connected to. +

You can have more than one callsign in all of the SEND commands. +

You can have multiple qualifiers so that you can have for example:- +

+

+
+  SEND RR COPY 123 PRIVATE G1TLH G0RDI
+
+
+

which should send a copy of message 123 to G1TLH and G0RDI and you will +receive a read receipt when they have read the message. +

SB is an alias for SEND NOPRIVATE (or send a bulletin in BBS speak) +SP is an alias for SEND PRIVATE +

+

7.65 set/address (0) +

+ +

set/address <your_address> Record your postal address +

+

Literally, record your address details on the cluster. +

+

7.66 set/announce (0) +

+ +

set/announce Allow announce messages +

+

Allow announce messages to arrive at your terminal. +

+

7.67 set/arcluster (5) +

+ +

set/arcluster <node_call> [<node_call> ...] Make +the node_call an AR-Cluster type node +

+

Set the node_call as an AR-Cluster type node +

+

7.68 set/baddx (8) +

+ +

set/baddx <call> Stop words we do not wish to see in the callsign field +of a dx spot being propagated +

+

Setting a word as 'baddx' will prevent spots with that word in the callsign +field of a DX spot from going any further. They will not be displayed and they +will not be sent onto other nodes. +

The word must be wriiten in full, no wild cards are allowed eg:- +

+

+
+  set/baddx FORSALE VIDEO FR0G 
+
+
+

To allow a word again, use the following command ... +

+

+
+  unset/baddx VIDEO
+
+
+

+

7.69 set/badnode (6) +

+ +

set/badnode <node_call> Stop spots from this node_call +being propagated +

+

Setting a callsign as a 'badnode' will prevent spots from that node +going any further. They will not be displayed and they will not be +sent onto other nodes. +

The call can be a full or partial call (or a prefix), eg:- +

+

+
+  set/badnode K1TTT 
+
+
+

will stop anything from K1TTT (including any SSID's) +

+

+
+  unset/badnode K1TTT
+
+
+

will allow spots from him again. +

Use with extreme care. This command may well be superceded by FILTERing. +

+

7.70 set/badspotter (8) +

+ +

set/badspotter <call> Stop spots from this callsign being propagated +

+

Setting a callsign as a 'badspotter' will prevent spots from this callsign +going any further. They will not be displayed and they will not be +sent onto other nodes. +

The call must be written in full, no wild cards are allowed eg:- +

+

+
+  set/badspotter VE2STN 
+
+
+

will stop anything from VE2STN. If you want SSIDs as well then you must +enter them specifically. +

+

+
+  unset/badspotter VE2STN
+
+
+

will allow spots from him again. +

Use with extreme care. This command may well be superceded by FILTERing. +

+

7.71 set/beep (0) +

+ +

set/beep Add beeps to terminal messages +

+

Add a beep to DX and other terminal messages. +

+

7.72 set/bbs (5) +

+ +

set/bbs <call> [<call>..]Make <call> a BBS +

+

7.73 set/clx (5) +

+ +

set/clx <node_call> [<node_call> ...] Make +the node_call a CLX type node +

+

Set the node_call as a CLX type node +

+

7.74 set/debug (9) +

+ +

set/debug <name> Add a debug level to the debug set +

+

You can choose to log several different levels. The levels are +

chan +state +msg +cron +connect +

You can show what levels you are logging with the show/debug +command. +

You can remove a debug level with unset/debug <name> +

+

7.75 set/dx (0) +

+ +

set/dxAllow DX messages to arrive at your terminal +

+

You can stop DX messages with the unset/dx command +

+

7.76 set/dxgrid (0) +

+ +

set/dxgridAllow grid squares on the end of DX messages +

+

Some logging programs do not like the additional information at +the end of a DX spot. If this is the case, use the unset/dxgrid +command to remove the grid squares. +

+

7.77 set/dxnet (5) +

+ +

set/dxnet <node_call> [<node_call> ...] Make +the node_call a DXNet type node +

+

Set the node_call as a DXNet type node +

+

7.78 set/echo (0) +

+ +

set/echo Make the cluster echo your input +

+

If you are connected via a telnet session, different implimentations +of telnet handle echo differently depending on whether you are +connected via port 23 or some other port. You can use this command +to change the setting appropriately. +

You can remove the echo with the unset/echo command +

The setting is stored in your user profile. +

YOU DO NOT NEED TO USE THIS COMMAND IF YOU ARE CONNECTED VIA AX25. +

+

7.79 set/here (0) +

+ +

set/here Set the here flag +

+

Let others on the cluster know you are here by only displaying your +callsign. If you are away from your terminal you can use the unset/here +command to let people know you are away. This simply puts brackets +around your callsign to indicate you are not available. +

+

7.80 set/homenode (0) +

+ +

set/homenode <node_call> Set your home cluster +

+

Tell the cluster system where you normally connect to. Any Messages sent +to you will normally find their way there should you not be connected. +eg:- +

+

+
+  SET/HOMENODE gb7djk
+
+
+

+

7.81 set/hops (8) +

+ +

set/hops <node_call> ann|spots|wwv|wcy <n> +Set hop count +

+

Set the hop count for a particular type of broadcast for a node. +

This command allows you to set up special hop counts for a node +for currently: announce, spots, wwv and wcy broadcasts. +

+

+
+eg:
+  set/hops gb7djk ann 10
+  set/hops gb7mbc spots 20
+
+
+

Set SHOW/HOPS for information on what is already set. This command +creates a filter and works in conjunction with the filter system. +

+

7.82 set/isolate (9) +

+ +

set/isolate <node call> 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. +

You can see which nodes are isolated with the show/isolate (1) command. +

You can remove the isolation with the command unset/isolate. +

+

7.83 set/language (0) +

+ +

set/language <language> Set the language you wish to use +

+

You can select the language that you want the cluster to use. Currently +the languages available are en (English) and nl (Dutch). +

+

7.84 set/location (0) +

+ +

set/location <lat and long> Set your latitude and longitude +

+

You can set your latitude and longitude manually or alternatively use the +set/qra command which will do the conversion for you. +

+

+
+  set/location 54 04 N 2 02 E
+
+
+

+

+

7.85 set/sys_location (9) +

+ +

set/sys_location <lat & long> Set your cluster 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 +then this command will set your QRA locator for you. For example:- +

+

+
+  SET/LOCATION 52 22 N 0 57 E
+
+
+

+

7.86 set/logininfo (0) +

+ +

set/logininfo Show logins and logouts of nodes and users +

+

Show users and nodes when they log in and out of the local cluster. You +can stop these messages by using the unset/logininfo command. +

+

+

7.87 set/lockout (9) +

+ +

set/lockout <call> Stop a callsign connecting to the cluster +

+

You can show who is locked out with the show/lockout command. +To allow the user to connect again, use the unset/lockout command. +

+

7.88 set/name (0) +

+ +

set/name <your_name> Set your name +

+

Tell the cluster what your name is, eg:- +

+

+
+  set/name Dirk
+
+
+

+

7.89 set/node (9) +

+ +

set/node <call> [<call> ...] Make the callsign an AK1A cluster +

+

Tell the system that the call(s) are to be treated as AK1A cluster and +fed PC Protocol rather normal user commands. +

From version 1.41 you can also set the following types of cluster +

+

+
+  set/spider
+  set/dxnet
+  set/clx
+  set/arcluster
+
+
+

To see what your nodes are set to, use the show/nodes command. +

+

7.90 set/obscount (9) +

+ +

set/obscount <count> <node call> Set the 'pump-up' obsolescence counter +

+

From version 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. +

+

7.91 set/page (0) +

+ +

set/page <n> Set the number of lines per page +

+

Tell the system how many lines you wish on a page when the number of lines +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
+
+
+

The setting is stored in your user profile. +

+

+

7.92 set/password (9) +

+ +

set/password <callsign> <string> Set a users password +

+

The password for a user can only be set by a full sysop. The string +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. The password is the usual 30 character baycom +type password. +

+

7.93 set/pinginterval (9) +

+ +

set/pinginterval <time> <node call> Set the ping time to neighbouring nodes +

+

As from version 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. +

+

7.94 set/privilege (9) +

+ +

set/privilege <n> <call> [<call> ...] Set the privilege level on a call +

+

Set the privilege level on a callsign. The privilege levels that pertain +to commands are as default:- +

+

+
+  0 - normal user
+  1 - allow remote nodes normal user RCMDs
+  5 - various privileged commands (including shutdown, but not disc-
+      connect), the normal level for another node.
+  8 - more privileged commands (including disconnect)
+  9 - local sysop privilege. DO NOT SET ANY REMOTE USER OR NODE TO THIS
+      LEVEL.
+
+
+

If you are a sysop and you come in as a normal user on a remote connection +your privilege will automatically be set to 0. +

+

7.95 set/spider (5) +

+ +

set/spider <node_call> [<node_call> ...] Make +the node_call a DXSpider type node +

+

Set the node_call as a DXSpider type node +

+

7.96 set/sys_qra (9) +

+ +

set/sys_qra <locator> Set your cluster QRA locator +

+

7.97 set/qra (0) +

+ +

set/qra <locator> Set your QRA locator +

+

Tell the system what your QRA (or Maidenhead) locator is. If you have not +done a SET/LOCATION then your latitude and longitude will be set roughly +correctly (assuming your locator is correct ;-). For example:- +

+

+
+  SET/QRA JO02LQ
+
+
+

+

7.98 set/qth (0) +

+ +

set/qth <your QTH> Set your QTH +

+

Tell the system where your are. For example:- +

+

+
+  set/qth East Dereham, Norfolk
+
+
+

+

7.99 set/talk (0) +

+ +

set/talk Allow talk messages to be seen at your console +

+

Allow talk messages to arrive at your console. You can switch off +talks with the unset/talk command. +

+

7.100 set/wcy (0) +

+ +

set/wcy Allow WCY messages to be seen at your console +

+

Allow WCY information to be seen at your console. You can switch off +WCY messages with the unset/wcy command. +

+

7.101 set/wwv (0) +

+ +

set/wwv Allow WWV messages to be seen at your console +

+

Allow WWV information to be seen at your console. You can switch off +WWV messages with the unset/wwv command. +

+

7.102 set/wx (0) +

+ +

set/wx Allow WX messages to be seen at your console +

+

Allow WX information to be seen at your console. You can switch off +WX messages with the unset/wx command. +

+

7.103 show/baddx (1) +

+ +

show/baddxShow all the bad dx calls in the system +

+

Display all the bad dx callsigns in the system, see SET/BADDX +for more information. +

+

7.104 show/badnode (6) +

+ +

show/badnode Show all the bad nodes in the system +

+

Display all the bad node callsigns in the system, see SET/BADNODE +for more information. +

+

7.105 show/badspotter (1) +

+ +

show/badspotter Show all the bad spotters in the system +

+

Display all the bad spotter's callsigns in the system, see SET/BADSPOTTER +for more information. +

+

7.106 show/configuration (0) +

+ +

show/configuration [<node>] Show all visible nodes and their users +

+

This command allows you to see all the users that can be seen +and the nodes to which they are connected. With the optional node, +you can specify a particular node to look at. +

This command is normally abbreviated to: sh/c +

BE WARNED: the list that is returned can be VERY long +

+

7.107 show/configuration/node (0) +

+ +

show/configuration/node Show all the nodes connected +

+

Show all the nodes connected locally and the nodes they have connected. +

+

7.108 show/connect (1) +

+ +

show/connect Show all the active connections +

+

This command shows information on all the active connections known to +the node. This command gives slightly more information than WHO. +

+

7.109 show/date (0) +

+ +

show/date [<prefix>|<callsign>] Show +the local time +

+

This is very nearly the same as SHOW/TIME, the only difference the format +of the date string if no arguments are given. +

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. +

+

7.110 show/debug (9) +

+ +

show/debug Show what levels of debug you are logging +

+

The levels can be set with set/debug +

+

7.111 show/dx (0) +

+ +

show/dx [options] interrogate the spot database +

+

If you just type SHOW/DX you will get the last so many spots +(sysop configurable, but usually 10). +

In addition you can add any number of these options in very nearly +any order to the basic SHOW/DX command, they are:- +

+

+
+   
+on <band>       - eg 160m 20m 2m 23cm 6mm
+on <region>     - eg hf vhf uhf shf      (see SHOW/BANDS)
+   
+<number>        - the number of spots you want
+<from>-<to>     - <from> spot no <to> spot no in 
+                  the selected list
+   
+<prefix>        - for a spotted callsign beginning with <prefix>
+*<suffix>       - for a spotted callsign ending in <suffix>
+*<string>*      - for a spotted callsign containing <string>
+   
+day <number>    - starting <number> days ago
+day <from>-<to> - <from> days <to> days ago
+   
+info <text>     - any spots containing <text> in the info or remarks
+   
+by <call>       - any spots spotted by <call> (spotter <call> 
+                        is the same).
+
+qsl             - this automatically looks for any qsl info on the call
+                  held in the spot database.
+
+iota [<iota>]   - If the iota island number is missing it will 
+                  look for the string iota and anything which looks like 
+                  an iota island number. If you specify then it will look 
+                  for that island.
+
+qra [<locator>] - this will look for the specific locator if 
+                  you specify one or else anything that looks like a locator.
+
+
+

e.g. +

+

+
+   
+   SH/DX 9m0
+   SH/DX on 20m info iota
+   SH/DX 9a on vhf day 30
+   SH/DX rf1p qsl
+   SH/DX iota 
+   SH/DX iota eu-064
+   SH/DX qra jn86
+
+
+

+

7.112 show/dxcc (0) +

+ +

show/dxcc <prefix> Interrogate the spot database by country +

+

This command takes the <prefix> (which can be a full or partial +callsign if desired), looks up which internal country number it is +and then displays all the spots as per SH/DX for that country. +

The options for SHOW/DX also apply to this command. +e.g. +

+

+
+   
+   SH/DXCC G
+   SH/DXCC W on 20m info iota
+
+
+

+

7.113 show/files (0) +

+ +

show/files [<filearea> [<string>]] List +the contents of a filearea +

+

SHOW/FILES on its own will show you a list of the various fileareas +available on the system. To see the contents of a particular file +area type:- +

+

+
+   SH/FILES <filearea>
+
+
+

where <filearea> is the name of the filearea you want to see the +contents of. +

You can also use shell globbing characters like '*' and '?' in a +string to see a selection of files in a filearea eg:- +

+

+
+   SH/FILES bulletins arld*
+
+
+

See also TYPE - to see the contents of a file. +

+

7.114 show/filter (0) +

+ +

show/filter Show the filters you have set +

+

Show the contents of all the filters that are set by you. This command +displays all the filters set - for all the various categories. +

+

7.115 show/filter (extended for sysops) (5) +

+ +

show/filter <callsign> Show the filters set by <callsign> +

+

A sysop can look at any filters that have been set. +

+

7.116 show/hops (8) +

+ +

show/hops <node_call> [ann|spots|wcy|wwv|] Show the hop counts for a node +

+

This command shows the hop counts set up for a node. You can specify +which category you want to see. If you leave the category out then +all the categories will be listed. +

+

7.117 show/isolate (1) +

+ +

show/isolate Show a list of isolated nodes +

+

Show which nodes are currently set to be isolated. +

+

7.118 show/lockout (9) +

+ +

show/lockout Show a list of excluded callsigns +

+

Show a list of callsigns that have been excluded (locked out) of the +cluster locally with the set/lockout command +

+

7.119 show/log (8)

-

One of the more important things a cluster sysop needs to do is to get -information to his users. The simplest way to do this is to have a banner -that is sent to the user on login. This is know as a "message of the day" -or "motd". To set this up, simply create a file in /spider/data called motd -and edit it to say whatever you want. It is purely a text file and will be -sent automatically to anyone logging in to the cluster. +

show/log [<callsign>] Show excerpts from the system log +

+

This command outputs a short section of the system log. On its own +it will output a general logfile. With the optional callsign it will +show output from the log associated with that callsign.

-

7.2 Downtime message +

7.120 show/moon (0)

-

If for any reason the cluster is down, maybe for upgrade or maintenance but -the machine is still running, a message can be sent to the user advising them -of the fact. This message lives in the /spider/data directory and is called -"offline". Simply create the file and edit it to say whatever you wish. -This file will be sent to a user attempting to log into the cluster when -DXSpider is not actually running. +

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
+
+

-

7.3 Other text messages +

7.121 show/muf (0)

-

You can set other text messages to be read by the user if they input the file -name. This could be for news items or maybe information for new users. -To set this up, make a directory under /spider called packclus. -Under this directory you can create files called news or newuser -for example. In fact you can create files with any names you like. These can -be listed by the user with the command .... +

show/muf <prefix> [<hours>][long] Show +the likely propagation to <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 +power of 20dBW and receiver sensitivity of -123dBm (about 0.15muV/10dB SINAD) +

The result predicts the most likely operating frequencies and signal +levels for high frequency (shortwave) radio propagation paths on +specified days of the year and hours of the day. It is most useful for +paths between 250 km and 6000 km, but can be used with reduced accuracy +for paths shorter or longer than this. +

The command uses a routine MINIMUF 3.5 developed by the U.S. Navy and +used to predict the MUF given the predicted flux, day of the year, +hour of the day and geographic coordinates of the transmitter and +receiver. This routine is reasonably accurate for the purposes here, +with a claimed RMS error of 3.8 MHz, but much smaller and less complex +than the programs used by major shortwave broadcasting organizations, +such as the Voice of America. +

The command will display some header information detailing its +assumptions, together with the locations, latitude and longitudes and +bearings. It will then show UTC (UT), local time at the other end +(LT), calculate the MUFs, Sun zenith angle at the midpoint of the path +(Zen) and the likely signal strengths. Then for each frequency for which +the system thinks there is a likelihood of a circuit it prints a value. +

The value is currently a likely S meter reading based on the conventional +6dB / S point scale. If the value has a '+' appended it means that it is +1/2 an S point stronger. If the value is preceeded by an 'm' it means that +there is likely to be much fading and by an 's' that the signal is likely +to be noisy. +

By default SHOW/MUF will show the next two hours worth of data. You +can specify anything up to 24 hours worth of data by appending the no of +hours required after the prefix. For example:-

-show/files
+  SH/MUF W
 
-

They can be read by the user by typing the command .... +

produces:

-type news
+  RxSens: -123 dBM SFI: 159   R: 193   Month: 10   Day: 21
+  Power :   20 dBW    Distance:  6283 km    Delay: 22.4 ms
+  Location                       Lat / Long           Azim
+  East Dereham, Norfolk          52 41 N 0 57 E         47
+  United-States-W                43 0 N 87 54 W        299
+  UT LT  MUF Zen  1.8  3.5  7.0 10.1 14.0 18.1 21.0 24.9 28.0 50.0
+  18 23 11.5 -35  mS0+ mS2   S3
+  19  0 11.2 -41  mS0+ mS2   S3
 
-

If the file they want to read is called news. You could also set -an alias for this in the Alias file to allow them just to type news +

indicating that you will have weak, fading circuits on top band and +80m but usable signals on 40m (about S3). +

inputing:-

-

You can also store other information in this directory, either directly or -nested under directories. One use for this would be to store DX bulletins -such as the OPDX bulletins. These can be listed and read by the user. -To keep things tidy, make a directory under /spider/packclus called -bulletin. Now copy any OPDX or similar bulletins into it. These -can be listed by the user in the same way as above using the show/files -command with an extension for the bulletin directory you have just created, -like this .... +

+
+  SH/MUF W 24
+
+
+

will get you the above display, but with the next 24 hours worth of +propagation data.

-show/files bulletin
+  SH/MUF W L 24
+  SH/MUF W 24 Long
 
+

Gives you an estimate of the long path propagation characterics. It +should be noted that the figures will probably not be very useful, nor +terrible accurate, but it is included for completeness. +

+

7.122 show/node (1) +

+ +

show/node [<node_call> ...] Show the type and version +number of nodes +

+

Show the type and version (if connected) of the nodes specified on the +command line. If no callsigns are specified then a sorted list of all +the non-user callsigns known to the system will be displayed. +

+

7.123 show/prefix (0) +

+ +

show/prefix <callsign> Interrogate the prefix database

-

An example would look like this .... +

This command takes the <callsign> (which can be a full or partial +callsign or a prefix), looks up which internal country number +it is and then displays all the relevant prefixes for that country +together with the internal country no, the CQ and ITU regions. +

See also SHOW/DXCC +

+

+

7.124 show/program (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. +

+

7.125 show/qra (0) +

+ +

show/qra <locator> [<locator>] Show the distance +between locators
+show/qra <lat> <long> Convert latitude and longitude to a locator
+

+

This is a multipurpose command that allows you either to calculate the +distance and bearing between two locators or (if only one locator is +given on the command line) the distance and beraing from your station +to the locator. For example:- +

+

+
+SH/QRA IO92QL 
+SH/QRA JN06 IN73
+
+
+

The first example will show the distance and bearing to the locator from +yourself, the second example will calculate the distance and bearing from +the first locator to the second. You can use 4 or 6 character locators. +

It is also possible to convert a latitude and longitude to a locator by +using this command with a latitude and longitude as an argument, for +example:-

-sh/files
-bulletin      DIR 20-Dec-1999 1715Z news          1602 14-Dec-1999 1330Z
+SH/QRA 52 41 N 0 58 E
 
-

You can see that in the files area (basically the packclus directory) there is a -file called news and a directory called bulletin. You can -also see that dates they were created. In the case of the file news, -you can also see the time it was last modified, a good clue as to whether the -file has been updated since you last read it. To read the file called -news you would simply issue the command .... +

+

7.126 show/qrz (0) +

+ +

show/qrz <callsign> Show any callbook details on a callsign +

+

This command queries the QRZ callbook server on the internet +and returns any information available for that callsign. This service +is provided for users of this software by http://www.qrz.com +

+

7.127 show/route (0) +

+ +

show/route <callsign> Show the route to <callsign> +

+

This command allows you to see to which node the callsigns specified are +connected. It is a sort of inverse sh/config.

-type news
+  sh/route n2tly
 
-

To look what is in the bulletin directory you issue the command .... +

+

7.128 show/satellite (0) +

+ +

show/satellite <name> [<hours> <interval>] +Show satellite tracking data +

+

Show the tracking data from your location to the satellite of your choice +from now on for the next few hours. +

If you use this command without a satellite name it will display a list +of all the satellites known currently to the system. +

If you give a name then you can obtain tracking data of all the passes +that start and finish 5 degrees below the horizon. As default it will +give information for the next three hours for every five minute period. +

You can alter the number of hours and the step size, within certain +limits. +

Each pass in a period is separated with a row of '-----' characters +

So for example:-

-show/files bulletin
-opdx390      21381 29-Nov-1999 1621Z opdx390.1     1670 29-Nov-1999 1621Z
-opdx390.2     2193 29-Nov-1999 1621Z opdx391      25045 29-Nov-1999 1621Z  
-opdx392      35969 29-Nov-1999 1621Z opdx393      15023 29-Nov-1999 1621Z  
-opdx394      33429 29-Nov-1999 1621Z opdx394.1     3116 29-Nov-1999 1621Z  
-opdx395      24319 29-Nov-1999 1621Z opdx396      32647 29-Nov-1999 1621Z
-opdx396.1     5537 29-Nov-1999 1621Z opdx396.2     6242 29-Nov-1999 1621Z
-opdx397      18433 29-Nov-1999 1621Z opdx398      19961 29-Nov-1999 1621Z  
-opdx399      17719 29-Nov-1999 1621Z opdx400      19600 29-Nov-1999 1621Z
-opdx401      27738 29-Nov-1999 1621Z opdx402      18698 29-Nov-1999 1621Z
-opdx403      24994 29-Nov-1999 1621Z opdx404      15685 29-Nov-1999 1621Z
-opdx405      13984 29-Nov-1999 1621Z opdx405.1     4166 29-Nov-1999 1621Z
-opdx406      28934 29-Nov-1999 1621Z opdx407      24153 29-Nov-1999 1621Z
-opdx408      15081 29-Nov-1999 1621Z opdx409      23234 29-Nov-1999 1621Z
-Press Enter to continue, A to abort (16 lines) >
+SH/SAT AO-10 
+SH/SAT FENGYUN1 12 2
 
-

You can now read any file in this directory using the type command, like this .... +

+

7.129 show/sun (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:-

-type bulletin/opdx391
-Ohio/Penn DX Bulletin No. 391
-The Ohio/Penn Dx PacketCluster
-DX Bulletin No. 391
-BID: $OPDX.391
-January 11, 1999
-Editor Tedd Mirgliotta, KB8NW
-Provided by BARF-80 BBS Cleveland, Ohio
-Online at 440-237-8208 28.8k-1200 Baud 8/N/1 (New Area Code!)
-Thanks to the Northern Ohio Amateur Radio Society, Northern Ohio DX
-Association, Ohio/Penn PacketCluster Network, K1XN & Golist, WB2RAJ/WB2YQH
-& The 59(9) DXReport, W3UR & The Daily DX, K3TEJ, KN4UG, W4DC, NC6J, N6HR,
-Press Enter to continue, A to abort (508 lines) >
+  SH/SUN
+  SH/SUN G1TLH K9CW ZS
 
-

The page length will of course depend on what you have it set to!

-

7.4 The Aliases file +

7.130 show/time (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. +

+

7.131 show/wcy (0) +

+ +

show/wcy Show the last 10 WCY broadcasts
+show/wcy <n> Show the last <n> WCY broadcasts
+

+

Display the most recent WCY information that has been received by the system +

+

7.132 show/wwv (0) +

+ +

show/wwv Show the last 10 WWV broadcasts
+show/wwv <n> Show the last <n> WWV broadcasts
+

+

Display the most recent WWV information that has been received by the system +

+

+

7.133 shutdown (5) +

+ +

shutdown Shutdown the cluster +

+

Shutdown the cluster and disconnect all the users. If you have Spider +set to respawn in /etc/inittab it will of course restart. +

+

7.134 spoof (9) +

+ +

spoof <callsign> <command> Run commands as another user +

+

This is a very simple yet powerful command for the sysop. It allows you to +issue commands as if you were a different user. This is very useful for the +kind of things that users seem to always get wrong.. like home_node for +example. +

+

7.135 stat/db (5) +

+ +

stat/db <dbname> Show the status of a database +

+

Show the internal status of a database descriptor. +

Depending on your privilege level you will see more or less information. +This command is unlikely to be of much use to anyone other than a sysop. +

+

7.136 stat/channel (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. +

+

7.137 stat/msg (5) +

+ +

stat/msg <msgno> Show the status of a message +

+

This command shows the internal status of a message and includes information +such as to whom it has been forwarded, its size, origin etc etc. +

+

If no message number is given then the status of the message system is +displayed. +

+

7.138 stat/route_node (5)

-

You will find a file in /spider/cmd/ called Aliases. First, copy this file to -/spider/local_cmd/Aliases and edit this file. You will see something like this ... +

stat/route_node <callsign> Show the data in a Route::Node object +

+

7.139 stat/route_user (5) +

+ +

stat/route_user <callsign> Show the data in a Route::User object +

+

7.140 stat/user (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. +

+

7.141 sysop (0) +

+ +

sysop Regain your privileges if you login remotely +

+

The system automatically reduces your privilege level to that of a +normal user if you login in remotely. This command allows you to +regain your normal privilege level. It uses the normal system: five +numbers are returned that are indexes into the character array that is +your assigned password (see SET/PASSWORD). The indexes start from +zero. +

You are expected to return a string which contains the characters +required in the correct order. You may intersperse those characters +with others to obscure your reply for any watchers. For example (and +these values are for explanation :-): +

+

+
+  password = 012345678901234567890123456789
+  > sysop
+  22 10 15 17 3
+
+
+

you type:-

+ aa2bbbb0ccc5ddd7xxx3n
+ or 2 0 5 7 3
+ or 20573
+
+
+

They will all match. If there is no password you will still be offered +numbers but nothing will happen when you input a string. Any match is +case sensitive. +

+

7.142 talk (0) +

-#!/usr/bin/perl +

talk <callsign> Enter talk mode with <callsign>
+talk <callsign> <text> Send a text message to <callsign>
+talk <callsign> > <node_call> [<text>] +Send a text message to <callsign> via <node_call>
+

+

Send a short message to any other station that is visible on the cluster +system. You can send it to anyone you can see with a SHOW/CONFIGURATION +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 logging on and off the cluster. +

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. +

If you want to have a ragchew with someone you can leave the text message +out and the system will go into 'Talk' mode. What this means is that a +short message is sent to the recipient telling them that you are in a 'Talking' +frame of mind and then you just type - everything you send will go to the +station that you asked for. +

All the usual announcements, spots and so on will still come out on your +terminal. +

If you want to do something (such as send a spot) you precede the normal +command with a '/' character, eg:- +

+

+
+   /DX 14001 G1TLH What's a B class licensee doing on 20m CW?
+   /HELP talk
+
+
+

To leave talk mode type: +

+

+
+   /EX
+
+
+

+

7.143 type (0) +

-# provide some standard aliases for commands for terminally -# helpless ak1a user (helpless in the sense that they never -# read nor understand help files) - -# This file is automagically reloaded if its modification time is -# later than the one stored in CmdAlias.pm - -# PLEASE make this file consistant with reality! (the patterns MUST -# match the filenames!) - -# Don't alter this file, copy it into the local_cmd tree and modify it. -# This file will be replaced everytime I issue a new release. - -# You only need to put aliases in here for commands that don't work as -# you desire naturally, e.g sh/dx on its own just works as you expect -# so you need not add it as an alias. - - - -package CmdAlias; - -%alias = ( - '?' => [ - '^\?', 'apropos', 'apropos', - ], - 'a' => [ - '^ann.*/full', 'announce full', 'announce', - '^ann.*/sysop', 'announce sysop', 'announce', - '^ann.*/(.*)$', 'announce $1', 'announce', - ], - 'b' => [ - ], - 'c' => [ - ], - 'd' => [ - '^del', 'kill', 'kill', - '^del\w*/fu', 'kill full', 'kill', - '^di\w*/a\w*', 'directory all', 'directory', - '^di\w*/b\w*', 'directory bulletins', 'directory', - '^di\w*/n\w*', 'directory new', 'directory', - '^di\w*/o\w*', 'directory own', 'directory', - '^di\w*/s\w*', 'directory subject', 'directory', - '^di\w*/t\w*', 'directory to', 'directory', - '^di\w*/f\w*', 'directory from', 'directory', - '^di\w*/(\d+)', 'directory $1', 'directory', - ], - 'e' => [ - ], - 'f' => [ - ], - 'g' => [ - ], - 'h' => [ - ], - 'i' => [ - ], - 'j' => [ - ], - 'k' => [ - ], - 'l' => [ - '^l$', 'directory', 'directory', - '^ll$', 'directory', 'directory', - '^ll/(\d+)', 'directory $1', 'directory', - ], - 'm' => [ - ], - 'n' => [ - '^news', 'type news', 'type', - ], - 'o' => [ - ], - 'p' => [ - ], - 'q' => [ - '^q', 'bye', 'bye', - ], - 'r' => [ - '^r$', 'read', 'read', - '^rcmd/(\S+)', 'rcmd $1', 'rcmd', - ], - 's' => [ - '^s/p$', 'send', 'send', - '^sb$', 'send noprivate', 'send', - '^set/home$', 'set/homenode', 'set/homenode', - '^set/nobe', 'unset/beep', 'unset/beep', - '^set/nohe', 'unset/here', 'unset/here', - '^set/noan', 'unset/announce', 'unset/announce', - '^set/nodx', 'unset/dx', 'unset/dx', - '^set/nota', 'unset/talk', 'unset/talk', - '^set/noww', 'unset/wwv', 'unset/wwv', - '^set/nowx', 'unset/wx', 'unset/wx', - '^sh$', 'show', 'show', - '^sh\w*/buck', 'dbshow buck', 'dbshow', - '^sh\w*/bu', 'show/files bulletins', 'show/files', - '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration', - '^sh\w*/c$', 'show/configuration', 'show/configuration', - '^sh\w*/com', 'dbavail', 'dbavail', - '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx', - '^sh\w*/dx/(\d+)', 'show/dx $1', 'show/dx', - '^sh\w*/dx/d(\d+)', 'show/dx from $1', 'show/dx', - '^sh\w*/email', 'dbshow email', 'dbshow', - '^sh\w*/hftest', 'dbshow hftest', 'dbshow', - '^sh\w*/vhftest', 'dbshow vhftest', 'dbshow', - '^sh\w*/qsl', 'dbshow qsl', 'dbshow', - '^sh\w*/tnc', 'who', 'who', - '^sh\w*/up', 'show/cluster', 'show/cluster', - '^sh\w*/w\w*/(\d+)-(\d+)', 'show/wwv $1-$2', 'show/wwv', - '^sh\w*/w\w*/(\d+)', 'show/wwv $1', 'show/wwv', - '^sp$', 'send', 'send', - - ], - 't' => [ - '^ta$', 'talk', 'talk', - '^t$', 'talk', 'talk', - ], - 'u' => [ - ], - 'v' => [ - ], - 'w' => [ - '^wx/full', 'wx full', 'wx', - '^wx/sysop', 'wx sysop', 'wx', - ], - 'x' => [ - ], - 'y' => [ - ], - 'z' => [ - ], -) - - -

You can create aliases for commands at will. Beware though, these may not -always turn out as you think. Care is needed and you need to test the -results once you have set an alias. -

-

7.5 Console.pl -

- -

In later versions of Spider a simple console program is provided for the sysop. -This has a type ahead buffer with line editing facilities and colour for spots, -announces etc. To use this program, simply use console.pl instead of client. -

-

To edit the colours, copy /spider/perl/Console.pl to /spider/local and edit the -file with your favourite editor. -

-

7.6 Updating kepler data -

- -

Spider has a powerful and flexible show/satellite command. In order for -this to be accurate, the kepler data has to be updated regularly. In -general, this data is available as an email or via cluster mail. -Updating it is simple. First you need to export the mail message as a -file. You do this with the export command from the cluster prompt -as the sysop. For example ... -

-

-
-export 5467 /spider/perl/keps.in
-
-
-

would export message number 5467 as a file called keps.in in the -/spider/perl directory. -

Now login to a VT as sysop and cd /spider/perl. There is a command in -the perl directory called convkeps.pl. All we need to do now is -convert the file like so ... -

-

-
-./convkeps.pl keps.in
-
-
-

Now go back to the cluster and issue the command ... -

-

-
-load/keps
+

type <filearea>/<name> Look at a file in one of the fileareas +

+

Type out the contents of a file in a filearea. So, for example, in +filearea 'bulletins' you want to look at file 'arld051' you would +enter:- +

+

+
+   TYPE bulletins/arld051
 
-

That is it! the kepler data has been updated. +

See also SHOW/FILES to see what fileareas are available and a +list of content. +

+

7.144 who (0) +

+ +

who Show who is physically connected locally

-

7.7 The QRZ callbook +

This is a quick listing that shows which callsigns are connected and +what sort of connection they have +

+

7.145 wx (0) +

+ +

wx <text> Send a weather message to local users
+wx full <text> Send a weather message to all cluster users
+

+

Weather messages can sometimes be useful if you are experiencing an extreme +that may indicate enhanced conditions +

+

7.146 wx (enhanced for sysops) (5)

-

The command sh/qrz will only work once you have followed a few -simple steps. First you need to get a user ID and password from qrz.com. -Simply go to the site and create one. Secondly you need to copy the file -/spider/perl/Internet.pm to /spider/local and alter it to match your user -ID and password. You also at this point need to set $allow=1 to complete -the setup. Many thanks to Fred Lloyd, the proprieter of -qrz.com for allowing this access. +

wx sysop <text> Send a weather message to other clusters only +

+

Send a weather message only to other cluster nodes and not to general users. +

+


-Next +Next Previous Contents diff --git a/html/adminmanual-8.html b/html/adminmanual-8.html index c90ef1fa..1adb3803 100644 --- a/html/adminmanual-8.html +++ b/html/adminmanual-8.html @@ -2,112 +2,2257 @@ - The DXSpider Administration Manual v1.47: CVS - + The DXSpider Administration Manual v1.47: The DXSpider command set -Next +Next Previous Contents
-

8. CVS

+

8. The DXSpider command set

-

CVS stands for "Concurrent Versions System" and the CVS for DXSpider is held -at -Sourceforge. This means -that it is possible to update your DXSpider installation to the latest -sources by using a few simple commands. +

Below is a complete list of commands available from the cluster prompt. +Most maintenance tasks are automatic but there are some commands that are useful +for a sysop. These are listed below in alphabetical order. The number in +brackets following the command name is the permissions level needed to use +the command.

-

THIS IS NOT FOR THE FAINT HEARTED!!! ONLY DO THIS IF YOU HAVE A TEST -INSTALLATION OR ARE WILLING TO HAVE YOUR CLUSTER CRASH ON YOU!!! -THIS MUST BE CONSIDERED AT LEAST BETA TESTING AND MAYBE EVEN ALPHA!! -YOU HAVE BEEN WARNED!!! +

8.1 accept/announce (0) +

+ +

accept/announce [0-9] <pattern> Set an accept filter +line for announce +

+

Create an 'accept this announce' line for a filter. +

An accept filter line means that if the announce matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  info <string>            eg: iota or qsl
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+  wx 1                     filter WX announces
+  dest <prefixes>          eg: 6MUK,WDX      (distros)
+
+
+

some examples:- +

+

+
+  acc/ann dest 6MUK
+  acc/ann 2 by_zone 14,15,16
+  (this could be all on one line: acc/ann dest 6MUK or by_zone 14,15,16)
+
+
+

or +

+

+
+  acc/ann by G,M,2 
+
+
+

This filter would only allow announces that were posted buy UK stations. +You can use the tag 'all' to accept everything eg: +

+

+
+  acc/ann all
+
+
+

but this probably for advanced users... +

+

8.2 accept/announce (extended for sysops) (8) +

+ +

accept/announce <call> [input] [0-9]<pattern> Announce filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/ann by G,M,2
+  accept/ann input node_default by G,M,2
+  accept/ann user_default by G,M,2
+
+
+

+

8.3 accept/spots (0) +

+ +

accept/announce [0-9] <pattern> Set an accept filter line for spots +

+

Create an 'accept this spot' line for a filter. +

+

An accept filter line means that if the spot matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  freq <range>           eg: 0/30000 or hf or hf/cw or 6m,4m,2m
+  on <range>             same as 'freq'
+  call <prefixes>        eg: G,PA,HB9
+  info <string>          eg: iota or qsl
+  by <prefixes>            
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  origin <prefixes>
+  channel <prefixes>
+
+
+

+

For frequencies, you can use any of the band names defined in +SHOW/BANDS and you can use a subband name like: cw, rtty, data, ssb - +thus: hf/ssb. You can also just have a simple range like: 0/30000 - +this is more efficient than saying simply: freq HF (but don't get +too hung up about that) +

some examples:- +

+

+
+  acc/spot 1 on hf/cw
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

You can use the tag 'all' to accept everything, eg: +

+

+
+  acc/spot 3 all
+
+
+

but this probably for advanced users... +

+

8.4 accept/spots (extended for sysops) (8) +

+ +

accept/spots <call> [input] [0-9] <pattern> Spot filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/spot db0sue-7 1 by_zone 14,15,16
+  accept/spot node_default all
+  set/hops node_default 10
+
+  accept/spot user_default by G,M,2
+
+
+

+

8.5 accept/wcy (0) +

+ +

accept/wcy [0-9] <pattern> set an accept WCY filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

+

There are no examples because WCY Broadcasts only come from one place and +you either want them or not (see UNSET/WCY if you don't want them). +

This command is really provided for future use. +

See HELP FILTER for information. +

+

8.6 accept/wcy (extended for sysops) (8) +

+ +

accept/wcy <call> [input] [0-9] <pattern> +WCY filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/wcy node_default all
+  set/hops node_default 10
+
+
+

+

8.7 accept/wwv (0) +

+ +

accept/wwv [0-9] <pattern> Set an accept WWV filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

for example +

+

+
+  accept/wwv by_zone 4
+
+
+

is probably the only useful thing to do (which will only show WWV broadcasts +by stations in the US). +

See HELP FILTER for information. +

+

8.8 accept/wwv (extended for sysops) (8) +

+ +

accept/wwv <call> [input] [0-9] <pattern> +WWV filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  accept/wwv db0sue-7 1 by_zone 4
+  accept/wwv node_default all
+  set/hops node_default 10
+
+  accept/wwv user_default by W,K
+
+
+

+

8.9 announce (0) +

+ +

announce <text> Send an announcement to local users +

+

Send an announcement to LOCAL users only, where <text> is the text +of the announcement you wish to broadcast +

+

8.10 announce full (0) +

+ +

announce full <text> Send an announcement cluster wide +

+

This command will send your announcement across the whole cluster +network. +

+

+

8.11 announce sysop (5) +

+ +

announce sysop <text> +

+

Send an announcement to Sysops only +

+

8.12 apropos (0) +

+ +

apropos <string> Search the help database +

+

Search the help database for <string> (it isn't case sensitive), +and print the names of all the commands that may be relevant. +

+

8.13 bye (0) +

+ +

bye Exit from the cluster +

+

This will disconnect you from the cluster +

+

8.14 catchup (5) +

+ +

catchup <node_call> All|[<msgno> ...] Mark a message as sent +

+

When you send messages the fact that you have forwarded it to another node +is remembered so that it isn't sent again. When you have a new partner +node and you add their callsign to your /spider/msg/forward.pl file, all +outstanding non-private messages will be forwarded to them. This may well +be ALL the non-private messages. You can prevent this by using these +commmands:- +

+

+
+  catchup GB7DJK all
+  catchup GB7DJK 300 301 302 303 500-510
+
+
+

and to undo what you have just done:- +

+

+
+  uncatchup GB7DJK all
+  uncatchup GB7DJK 300 301 302 303 500-510
+
+
+

which will arrange for them to be forward candidates again. +

Order is not important. +

+

8.15 clear/spots (0) +

+ +

clear/spots [1|all] Clear a spot filter line +

+

This command allows you to clear (remove) a line in a spot filter or to +remove the whole filter. +

If you have a filter:- +

+

+
+  acc/spot 1 on hf/cw
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

and you say:- +

+

+
+  clear/spot 1
+
+
+

you will be left with:- +

+

+
+  acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

If you do: +

+

+
+  clear/spot all
+
+
+

the filter will be completely removed. +

+

+

8.16 connect (5) +

+ +

connect <callsign> Start a connection to another DX Cluster +

+

Start a connection process that will culminate in a new connection to the +DX cluster <callsign>. This process creates a new 'client' process which will +use the script in /spider/connect/<callsign> to effect the 'chat' exchange +necessary to traverse the network(s) to logon to the cluster <callsign>. +

+

8.17 dbavail (0) +

+ +

dbavail Show a list of all the databases in the system +

+

The title says it all really, this command lists all the databases defined +in the system. It is also aliased to SHOW/COMMAND. +

+

8.18 dbcreate (9) +

+ +

dbcreate <name> Create a database entry
+dbcreate <name> chain <name> [<name>..] Create a chained database entry
+dbcreate <name> remote <node> Create a remote database +entry
+

+

DBCREATE allows you to define a database in the system. It doesn't actually +create anything, just defines it. +

The databases that are created are simple DB_File hash databases, they are +therefore already 'indexed'. +

You can define a local database with the first form of the command eg: +

DBCREATE oblast +

You can also chain databases with the addition of the 'chain' keyword. +This will search each database one after the other. A typical example +is: +

DBCREATE sdx_qsl chain sql_ad +

No checking is done to see if the any of the chained databases exist, in +fact it is usually better to do the above statement first then do each of +the chained databases. +

Databases can exist offsite. To define a database that lives on another +node do: +

DBCREATE buckmaster remote gb7dxc +

Remote databases cannot be chained; however, the last database in a +a chain can be a remote database eg: +

DBCREATE qsl chain gb7dxc +

To see what databases have been defined do: +

DBAVAIL (or it will have been aliased to SHOW/COMMAND) +

It would be normal for you to add an entry into your local Aliases file +to allow people to use the 'SHOW/<dbname>' style syntax. So you would +need to add a line like:- +

+

+
+  's' => [
+    ..
+    ..
+    '^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
+    ..
+    ..
+   ],
+
+
+

to allow +

SH/BUCK g1tlh +

to work as they may be used to. +

See DBIMPORT for the importing of existing AK1A format data to databases. +See DBSHOW for generic database enquiry +

+

8.19 dbimport (9) +

+ +

dbimport <dbname> Import AK1A data into a database +

+

If you want to import or update data in bulk to a database you can use +this command. It will either create or update entries into an existing +database. For example:- +

DBIMPORT oblast /tmp/OBLAST.FUL +

will import the standard OBLAST database that comes with AK1A into the +oblast database held locally. +

+

8.20 dbremove (9) +

+ +

dbremove <dbname> Delete a database +

+

DBREMOVE will completely remove a database entry and also delete any data +file that is associated with it. +

There is no warning, no comeback, no safety net. +

For example: +

DBREMOVE oblast +

will remove the oblast database from the system and it will also remove +the associated datafile. +

I repeat: +

There is no warning, no comeback, no safety net. +

You have been warned. +

+

8.21 dbshow (0) +

+ +

dbshow <dbname> <key> Display an entry, if it exists, in a database +

+

This is the generic user interface to the database to the database system. +It is expected that the sysop will add an entry to the local Aliases file +so that users can use the more familiar AK1A style of enquiry such as: +

+

+
+  SH/BUCK G1TLH
+
+
+

but if he hasn't and the database really does exist (use DBAVAIL or +SHOW/COMMAND to find out) you can do the same thing with: +

+

+
+  DBSHOW buck G1TLH
+
+
+

+

+

8.22 debug (9) +

+ +

debug Set the cluster program into debug mode +

+

Executing this command will only have an effect if you are running the cluster +in debug mode i.e. +

+

+
+        perl -d cluster.pl
+
+
+

It will interrupt the cluster just after the debug command has finished. +

+

8.23 directory (0) +

+ +

directory List messages
directory all List all messages
+directory own List your own messages
+directory new List all new messages
+directory to <call> List all messages to <call>
+directory from <call> List all messages from <call>
+directory subject <string> List all messages with <string> in subject
+directory <nn> List last <nn> messages
+directory <from>-<to> List messages <from> message <to> message
+

+

List the messages in the messages directory. +

If there is a 'p' one space after the message number then it is a +personal message. If there is a '-' between the message number and the +'p' then this indicates that the message has been read. +

You can use shell escape characters such as '*' and '?' in the <call> +fields. +

You can combine some of the various directory commands together eg:- +

+

+
+   DIR TO G1TLH 5
+or 
+   DIR SUBJECT IOTA 200-250
+
+
+

You can abbreviate all the commands to one letter and use ak1a syntax:- +

+

+
+   DIR/T G1* 10
+   DIR/S QSL 10-100 5
+
+
+

+

+

8.24 directory (extended for sysops) (5) +

+ +

Works just like the user command except that sysops can see ALL messages. +

+

8.25 disconnect (8) +

+ +

disconnect <call> [<call> ...] Disconnect a user or node +

+

Disconnect any <call> connected locally +

+

8.26 dx (0) +

+ +

dx [by <call>] <freq> <call> <remarks> Send a DX spot +

+

This is how you send a DX Spot to other users. You can, in fact, now +enter the <freq> and the <call> either way round. +

+

+
+   DX FR0G 144.600
+   DX 144.600 FR0G
+   DX 144600 FR0G 
+
+
+

will all give the same result. You can add some remarks to the end +of the command and they will be added to the spot. +

+

+
+   DX FR0G 144600 this is a test
+
+
+

You can credit someone else by saying:- +

+

+
+   DX by G1TLH FR0G 144.600 he isn't on the cluster
+
+
+

The <freq> is compared against the available bands set up in the +cluster. See SHOW/BANDS for more information. +

+

8.27 export (9) +

+ +

export <msgno> <filename> Export a message to a file +

+

Export a message to a file. This command can only be executed on a local +console with a fully privileged user. The file produced will be in a form +ready to be imported back into the cluster by placing it in the import +directory (/spider/msg/import). +

This command cannot overwrite an existing file. This is to provide some +measure of security. Any files written will owned by the same user as the +main cluster, otherwise you can put the new files anywhere the cluster can +access. For example:- +

EXPORT 2345 /tmp/a +

+

8.28 export_users (9) +

+ +

export_users [<filename>] Export the users database to ascii +

+

Export the users database to a file in ascii format. If no filename +is given then it will export the file to /spider/data/user_asc. +

If the file already exists it will be renamed to <filename>.o. In fact +up to 5 generations of the file can be kept each one with an extra 'o' on the +suffix. +

BE WARNED: this will write to any file you have write access to. No check is +made on the filename (if any) that you specify. +

+

8.29 forward/latlong (8) +

+ +

forward/latlong <node_call> Send latitude and longitude information to another cluster +

+

This command sends all the latitude and longitude information that your +cluster is holding against callsigns. One advantage of recieving this +information is that more locator information is held by you. This +means that more locators are given on the DX line assuming you have +set/dxgrid enabled. This could be a LOT of information though, so +it is not recommended on slow links. +

+

8.30 forward/opername (1) +

+ +

forward/opername <call> Send out information on this <call> to all clusters +

+

This command sends out any information held in the user file which can +be broadcast in PC41 protocol packets. This information is Name, QTH, Location +and Homenode. PC41s are only sent for the information that is available. +

+

8.31 help (0) +

+ +

help <cmd> Get help on a command +

+

All commands can be abbreviated, so SHOW/DX can be abbreviated +to SH/DX, ANNOUNCE can be shortened to AN and so on. +

Look at the APROPOS <string> command which will search the help database +for the <string> you specify and give you a list of likely commands +to look at with HELP. +

+

8.32 init (5) +

+ +

init <node call> Re-initialise a link to an AK1A compatible node +

+

This command attempts to re-initialise a link to a (usually) AK1A node +that has got confused, usually by a protocol loop of some kind. It may +work - but you usually will be better off simply disconnecting it (or +better, if it is a real AK1A node, doing an RCMD <node> DISC/F <your +node>). +

Best of luck - you will need it. +

+

8.33 kill (0) +

+ +

kill <msgno> [<msgno> ..] Delete a message from the local system +

+

Delete a message from the local system. You will only be able to +delete messages that you have originated or been sent (unless you are +the sysop). +

+

8.34 kill (5) +

+ +

kill <msgno> [<msgno> ...] Remove or erase a message from the system
+kill from <call> Remove all messages from a callsign
+kill to <call> Remove all messages to a callsign
+

+

You can get rid of any message to or originating from your callsign using +this command. You can remove more than one message at a time. +

As a sysop you can kill any message on the system. +

+

8.35 kill full (5) +

+ +

kill full <msgno> [<msgno>] Delete a message from the whole cluster +

+

Delete a message (usually a 'bulletin') from the whole cluster system. +

This uses the subject field, so any messages that have exactly the same subject +will be deleted. Beware! +

+

8.36 links (0) +

+ +

links Show which nodes are physically connected +

+

This is a quick listing that shows which links are connected and +some information about them. See WHO for a list of all connections. +

+

+

8.37 load/aliases (9) +

+ +

load/aliases Reload the command alias table +

+

Reload the /spider/cmd/Aliases file after you have editted it. You will need to +do this if you change this file whilst the cluster is running in order for the +changes to take effect. +

+

+

8.38 load/baddx (9) +

+ +

load/baddx Reload the bad DX table +

+

Reload the /spider/data/baddx.pl file if you have changed it manually whilst +the cluster is running. This table contains the DX Calls that, if spotted, +will not be passed on. FR0G and TEST are classic examples. +

+

8.39 load/badmsg (9) +

+ +

load/badmsg Reload the bad message table +

+

Reload the /spider/msg/badmsg.pl file if you have changed it manually whilst +the cluster is running. This table contains a number of perl regular +expressions which are searched for in the fields targetted of each message. +If any of them match then that message is immediately deleted on receipt. +

+

8.40 load/badwords (9) +

+ +

load/badwords Reload the badwords file +

+

Reload the /spider/data/badwords file if you have changed it manually whilst +the cluster is running. This file contains a list of words which, if found +on certain text portions of PC protocol, will cause those protocol frames +to be rejected. It will all put out a message if any of these words are +used on the announce, dx and talk commands. The words can be one or +more on a line, lines starting with '#' are ignored. +

+

8.41 load/bands (9) +

+ +

load/bands Reload the band limits table +

+

Reload the /spider/data/bands.pl file if you have changed it manually whilst +the cluster is running. +

+

8.42 load/cmd_cache (9) +

+ +

load/cmd_cache Reload the automatic command cache +

+

Normally, if you change a command file in the cmd or local_cmd tree it will +automatially be picked up by the cluster program. Sometimes it can get confused +if you are doing a lot of moving commands about or delete a command in the +local_cmd tree and want to use the normal one again. Execute this command to +reset everything back to the state it was just after a cluster restart. +

+

8.43 load/forward (9) +

+ +

load/forward Reload the msg forwarding routing table +

Reload the /spider/msg/forward.pl file if you have changed it +manually whilst the cluster is running. +

+

8.44 load/messages (9) +

+ +

load/messages Reload the system messages file +

+

If you change the /spider/perl/Messages file (usually whilst fiddling/writing ne +commands) you can have them take effect during a cluster session by executing this +command. You need to do this if get something like :- +

unknown message 'xxxx' in lang 'en' +

+

8.45 load/prefixes (9) +

+ +

load/prefixes Reload the prefix table +

+

Reload the /spider/data/prefix_data.pl file if you have changed it manually +whilst the cluster is running. +

+

8.46 merge (5) +

+ +

merge <node> [<no spots>/<no wwv>] Ask for the latest spots and WWV +

+

MERGE allows you to bring your spot and wwv database up to date. By default +it will request the last 10 spots and 5 WWVs from the node you select. The +node must be connected locally. +

You can request any number of spots or wwv and although they will be appended +to your databases they will not duplicate any that have recently been added +(the last 2 days for spots and last month for WWV data). +

+

8.47 msg (9) +

+ +

msg <cmd> <msgno> [data ...] Alter various message parameters +

+

Alter message parameters like To, From, Subject, whether private or bulletin +or return receipt (RR) is required or whether to keep this message from timing +out. +

+

+
+  MSG TO <msgno> <call>     - change TO callsign to <call>
+  MSG FRom <msgno> <call>   - change FROM callsign to <call>
+  MSG PRrivate <msgno>      - set private flag
+  MSG NOPRrivate <msgno>    - unset private flag
+  MSG RR <msgno>            - set RR flag
+  MSG NORR <msgno>          - unset RR flag
+  MSG KEep <msgno>          - set the keep flag (message won't be deleted ever)
+  MSG NOKEep <msgno>        - unset the keep flag
+  MSG SUbject <msgno> <new> - change the subject to <new>
+  MSG WAittime <msgno>      - remove any waitting time for this message
+  MSG NOREad <msgno>        - mark message as unread
+  MSG REad <msgno>          - mark message as read
+  MSG QUeue                 - queue any outstanding bulletins
+  MSG QUeue 1               - queue any outstanding private messages
+
+
+

You can look at the status of a message by using:- +

STAT/MSG <msgno> +

This will display more information on the message than DIR does. +

+

8.48 pc (8) +

+ +

pc <call> <text> Send text (eg PC Protocol) to <call> +

+

Send some arbitrary text to a locally connected callsign. No processing is done on +the text. This command allows you to send PC Protocol to unstick things if problems +arise (messages get stuck etc). eg:- +

pc gb7djk PC33^GB7TLH^GB7DJK^400^ +

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. +

pc G1TLH Try doing that properly!!! +

+

8.49 ping (1) +

+ +

ping <node> Check the link quality between nodes +

+

his command allows you to send a frame to another cluster node on +the network and get a return frame. The time it takes to do this +is a good indication of the quality of the link. The actual time +it takes is output to the console in seconds. +Any visible cluster node can be PINGed. +

+

+

8.50 rcmd (1) +

+ +

rcmd <node call> <cmd> Send a command to another DX cluster +

+

This command allows you to send nearly any command to another DX Cluster +node that is connected to the system. +

Whether you get any output is dependant on a) whether the other system knows +that the node callsign of this cluster is in fact a node b) whether the +other system is allowing RCMDs from this node and c) whether you have +permission to send this command at all. +

+

8.51 read (0) +

+ +

read Read the next unread personal message addressed to you
+read <msgno> Read the specified message
+

+

You can read any messages that are sent as 'non-personal' and also any +message either sent by or sent to your callsign. +

+

+

8.52 read (extended for sysops) (5) +

+ +

read <msgno> Read a message on the system +

+

As a sysop you may read any message on the system +

+

8.53 reject/announce +

+ +

reject/announce [0-9] <pattern> Set a reject filter +for announce +

+

Create an 'reject this announce' line for a filter. +

An reject filter line means that if the announce matches this filter it is +passed onto the user. See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  info <string>            eg: iota or qsl
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+  wx 1                     filter WX announces
+  dest <prefixes>          eg: 6MUK,WDX      (distros)
+
+
+

some examples:- +

+

+
+  rej/ann by_zone 14,15,16 and not by G,M,2
+
+
+

You can use the tag 'all' to reject everything eg: +

+

+
+  rej/ann all
+
+
+

but this probably for advanced users... +

+

8.54 reject/announce (extended for sysops) (8) +

+ +

reject/announce <call> [input] [0-9] <pattern> Announce filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/ann by G,M,2
+  reject/ann input node_default by G,M,2
+  reject/ann user_default by G,M,2
+
+
+

+

8.55 reject/spots (0) +

+ +

reject/spots [0-9] <pattern> Set a reject filter line for spots +

+

Create a 'reject this spot' line for a filter. +

A reject filter line means that if the spot matches this filter it is +dumped (not passed on). See HELP FILTERS for more info. Please read this +to understand how filters work - it will save a lot of grief later on. +

You can use any of the following things in this line:- +

+

+
+  freq <range>           eg: 0/30000 or hf or hf/cw or 6m,4m,2m
+  on <range>             same as 'freq'
+  call <prefixes>        eg: G,PA,HB9
+  info <string>          eg: iota or qsl
+  by <prefixes>            
+  call_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  call_itu <numbers>
+  call_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  origin <prefixes>
+  channel <prefixes>
+
+
+

For frequencies, you can use any of the band names defined in +SHOW/BANDS and you can use a subband name like: cw, rtty, data, ssb - +thus: hf/ssb. You can also just have a simple range like: 0/30000 - +this is more efficient than saying simply: on HF (but don't get +too hung up about that) +

some examples:- +

+

+
+  rej/spot 1 on hf
+  rej/spot 2 on vhf and not (by_zone 14,15,16 or call_zone 14,15,16)
+
+
+

You can use the tag 'all' to reject everything eg: +

+

+
+  rej/spot 3 all
+
+
+

but this probably for advanced users... +

+

8.56 reject/spots (extended for sysops) (8) +

+ +

reject/spots <call> [input] [0-9] <pattern> +Reject spot filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/spot db0sue-7 1 by_zone 14,15,16
+  reject/spot node_default all
+  set/hops node_default 10
+
+  reject/spot user_default by G,M,2
+
+
+

+

8.57 reject/wcy (0) +

+ +

reject/wcy [0-9] <pattern> Set a reject WCY filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

There are no examples because WCY Broadcasts only come from one place and +you either want them or not (see UNSET/WCY if you don't want them). +

This command is really provided for future use. +

See HELP FILTER for information. +

+

8.58 reject/wcy (extended for sysops) (8) +

+ +

reject/wcy <call> [input] [0-9] <pattern> +WCY reject filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

reject/wcy gb7djk all +

+

8.59 reject/wwv (0) +

+ +

reject/wwv [0-9] <pattern> Set a reject WWV filter +

+

It is unlikely that you will want to do this, but if you do then you can +filter on the following fields:- +

+

+
+  by <prefixes>            eg: G,M,2         
+  origin <prefixes>
+  origin_dxcc <numbers>    eg: 61,62 (from eg: sh/pre G)
+  origin_itu <numbers>
+  origin_zone <numbers>
+  by_dxcc <numbers>
+  by_itu <numbers>
+  by_zone <numbers>
+  channel <prefixes>
+
+
+

for example +

+

+
+  reject/wwv by_zone 14,15,16
+
+
+

is probably the only useful thing to do (which will only show WWV broadcasts +by stations in the US). +

See HELP FILTER for information. +

+

8.60 reject/wwv (extended for sysops) (8) +

+ +

reject/wwv <call> [input] [0-9] <pattern> +WWV reject filter sysop version +

+

This version allows a sysop to set a filter for a callsign as well as the +default for nodes and users eg:- +

+

+
+  reject/wwv db0sue-7 1 by_zone 4
+  reject/wwv node_default all
+
+  reject/wwv user_default by W
+
+
+

+

8.61 reply (0) +

+ +

reply Reply (privately) to the last message that you have read
+reply <msgno> Reply (privately) to the specified message
+reply B <msgno> Reply as a Bulletin to the specified message
+reply NOPrivate <msgno> Reply as a Bulletin to the specified +message
+reply RR <msgno> Reply to the specified message with read receipt
+

+

You can reply to a message and the subject will automatically have +"Re:" inserted in front of it, if it isn't already present. +

You can also use all the extra qualifiers such as RR, PRIVATE, +NOPRIVATE, B that you can use with the SEND command (see SEND +for further details) +

+

8.62 send (0) +

+ +

send <call> [<call> ...] Send a message to one or more callsigns
+send RR <call> Send a message and ask for a read receipt
+send COPY <msgno> <call> Send a copy of a message to someone
+send PRIVATE <call> Send a personal message
+send NOPRIVATE <call> Send a message to all stations
+

+

All the SEND commands will create a message which will be sent either to +an individual callsign or to one of the 'bulletin' addresses. +

SEND <call> on its own acts as though you had typed SEND PRIVATE, that is +it will mark the message as personal and send it to the cluster node that +that callsign is connected to. +

You can have more than one callsign in all of the SEND commands. +

You can have multiple qualifiers so that you can have for example:- +

+

+
+  SEND RR COPY 123 PRIVATE G1TLH G0RDI
+
+
+

which should send a copy of message 123 to G1TLH and G0RDI and you will +receive a read receipt when they have read the message. +

SB is an alias for SEND NOPRIVATE (or send a bulletin in BBS speak) +SP is an alias for SEND PRIVATE +

+

8.63 set/address (0) +

+ +

set/address <your_address> Record your postal address +

+

Literally, record your address details on the cluster. +

+

8.64 set/announce (0) +

+ +

set/announce Allow announce messages +

+

Allow announce messages to arrive at your terminal. +

+

8.65 set/arcluster (5) +

+ +

set/arcluster <node_call> [<node_call> ...] Make +the node_call an AR-Cluster type node +

+

Set the node_call as an AR-Cluster type node +

+

8.66 set/baddx (8) +

+ +

set/baddx <call> Stop words we do not wish to see in the callsign field +of a dx spot being propagated +

+

Setting a word as 'baddx' will prevent spots with that word in the callsign +field of a DX spot from going any further. They will not be displayed and they +will not be sent onto other nodes. +

The word must be wriiten in full, no wild cards are allowed eg:- +

+

+
+  set/baddx FORSALE VIDEO FR0G 
+
+
+

To allow a word again, use the following command ... +

+

+
+  unset/baddx VIDEO
+
+
+

+

8.67 set/badnode (6) +

+ +

set/badnode <node_call> Stop spots from this node_call +being propagated +

+

Setting a callsign as a 'badnode' will prevent spots from that node +going any further. They will not be displayed and they will not be +sent onto other nodes. +

The call can be a full or partial call (or a prefix), eg:- +

+

+
+  set/badnode K1TTT 
+
+
+

will stop anything from K1TTT (including any SSID's) +

+

+
+  unset/badnode K1TTT
+
+
+

will allow spots from him again. +

Use with extreme care. This command may well be superceded by FILTERing. +

+

8.68 set/badspotter (8) +

+ +

set/badspotter <call> Stop spots from this callsign being propagated +

+

Setting a callsign as a 'badspotter' will prevent spots from this callsign +going any further. They will not be displayed and they will not be +sent onto other nodes. +

The call must be written in full, no wild cards are allowed eg:- +

+

+
+  set/badspotter VE2STN 
+
+
+

will stop anything from VE2STN. If you want SSIDs as well then you must +enter them specifically. +

+

+
+  unset/badspotter VE2STN
+
+
+

will allow spots from him again. +

Use with extreme care. This command may well be superceded by FILTERing. +

+

8.69 set/beep (0) +

+ +

set/beep Add beeps to terminal messages +

+

Add a beep to DX and other terminal messages. +

+

8.70 set/clx (5) +

+ +

set/clx <node_call> [<node_call> ...] Make +the node_call a CLX type node +

+

Set the node_call as a CLX type node +

+

8.71 set/debug (9) +

+ +

set/debug <name> Add a debug level to the debug set +

+

You can choose to log several different levels. The levels are +

chan +state +msg +cron +connect +

You can show what levels you are logging with the show/debug +command. +

You can remove a debug level with unset/debug <name> +

+

8.72 set/dx (0) +

+ +

set/dxAllow DX messages to arrive at your terminal +

+

You can stop DX messages with the unset/dx command +

+

8.73 set/dxgrid (0) +

+ +

set/dxgridAllow grid squares on the end of DX messages +

+

Some logging programs do not like the additional information at +the end of a DX spot. If this is the case, use the unset/dxgrid +command to remove the grid squares. +

+

8.74 set/dxnet (5) +

+ +

set/dxnet <node_call> [<node_call> ...] Make +the node_call a DXNet type node +

+

Set the node_call as a DXNet type node +

+

8.75 set/echo (0) +

+ +

set/echo Make the cluster echo your input +

+

If you are connected via a telnet session, different implimentations +of telnet handle echo differently depending on whether you are +connected via port 23 or some other port. You can use this command +to change the setting appropriately. +

You can remove the echo with the unset/echo command +

The setting is stored in your user profile. +

YOU DO NOT NEED TO USE THIS COMMAND IF YOU ARE CONNECTED VIA AX25. +

+

8.76 set/here (0) +

+ +

set/here Set the here flag +

+

Let others on the cluster know you are here by only displaying your +callsign. If you are away from your terminal you can use the unset/here +command to let people know you are away. This simply puts brackets +around your callsign to indicate you are not available. +

+

8.77 set/homenode (0) +

+ +

set/homenode <node_call> Set your home cluster +

+

Tell the cluster system where you normally connect to. Any Messages sent +to you will normally find their way there should you not be connected. +eg:- +

+

+
+  SET/HOMENODE gb7djk
+
+
+

+

8.78 set/hops (8) +

+ +

set/hops <node_call> ann|spots|wwv|wcy <n> +Set hop count +

+

Set the hop count for a particular type of broadcast for a node. +

This command allows you to set up special hop counts for a node +for currently: announce, spots, wwv and wcy broadcasts. +

+

+
+eg:
+  set/hops gb7djk ann 10
+  set/hops gb7mbc spots 20
+
+
+

Set SHOW/HOPS for information on what is already set. This command +creates a filter and works in conjunction with the filter system. +

+

8.79 set/isolate (9) +

+ +

set/isolate <node call> 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. +

You can see which nodes are isolated with the show/isolate (1) command. +

You can remove the isolation with the command unset/isolate. +

+

8.80 set/language (0) +

+ +

set/language <language> Set the language you wish to use +

+

You can select the language that you want the cluster to use. Currently +the languages available are en (English) and nl (Dutch). +

+

8.81 set/location (0) +

+ +

set/location <lat and long> Set your latitude and longitude +

+

You can set your latitude and longitude manually or alternatively use the +set/qra command which will do the conversion for you. +

+

+
+  set/location 54 04 N 2 02 E
+
+
+

+

+

8.82 set/sys_location (9) +

+ +

set/sys_location <lat & long> Set your cluster 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 +then this command will set your QRA locator for you. For example:- +

+

+
+  SET/LOCATION 52 22 N 0 57 E
+
+
+

+

8.83 set/logininfo (0) +

+ +

set/logininfo Show logins and logouts of nodes and users +

+

Show users and nodes when they log in and out of the local cluster. You +can stop these messages by using the unset/logininfo command. +

+

+

8.84 set/lockout (9) +

+ +

set/lockout <call> Stop a callsign connecting to the cluster +

+

You can show who is locked out with the show/lockout command. +To allow the user to connect again, use the unset/lockout command. +

+

8.85 set/name (0) +

+ +

set/name <your_name> Set your name +

+

Tell the cluster what your name is, eg:- +

+

+
+  set/name Dirk
+
+
+

+

8.86 set/node (9) +

+ +

set/node <call> [<call> ...] Make the callsign an AK1A cluster +

+

Tell the system that the call(s) are to be treated as AK1A cluster and +fed PC Protocol rather normal user commands. +

From version 1.41 you can also set the following types of cluster +

+

+
+  set/spider
+  set/dxnet
+  set/clx
+  set/arcluster
+
+
+

To see what your nodes are set to, use the show/nodes command. +

+

8.87 set/obscount (9) +

+ +

set/obscount <count> <node call> Set the 'pump-up' obsolescence counter +

+

From version 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. +

+

8.88 set/page (0) +

+ +

set/page <n> Set the number of lines per page +

+

Tell the system how many lines you wish on a page when the number of lines +of output from a command is more than this. The default is 20. Setting it +explicitly to 0 will disable paging.

-

DID I MENTION..... ONLY DO THIS IF YOU ARE WILLING TO ACCEPT THE -CONSEQUENCES!!! +

+
+  SET/PAGE 30
+  SET/PAGE 0
+
+
+

The setting is stored in your user profile. +

+

+

8.89 set/password (9) +

+ +

set/password <callsign> <string> Set a users password +

+

The password for a user can only be set by a full sysop. The string +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. The password is the usual 30 character baycom +type password. +

+

8.90 set/pinginterval (9) +

+ +

set/pinginterval <time> <node call> Set the ping time to neighbouring nodes +

+

As from version 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. +

+

8.91 set/privilege (9) +

+ +

set/privilege <n> <call> [<call> ...] Set the privilege level on a call +

+

Set the privilege level on a callsign. The privilege levels that pertain +to commands are as default:- +

+

+
+  0 - normal user
+  1 - allow remote nodes normal user RCMDs
+  5 - various privileged commands (including shutdown, but not disc-
+      connect), the normal level for another node.
+  8 - more privileged commands (including disconnect)
+  9 - local sysop privilege. DO NOT SET ANY REMOTE USER OR NODE TO THIS
+      LEVEL.
+
+
+

If you are a sysop and you come in as a normal user on a remote connection +your privilege will automatically be set to 0. +

+

8.92 set/spider (5) +

+ +

set/spider <node_call> [<node_call> ...] Make +the node_call a DXSpider type node +

+

Set the node_call as a DXSpider type node +

+

8.93 set/sys_qra (9) +

+ +

set/sys_qra <locator> Set your cluster QRA locator +

+

8.94 set/qra (0) +

+ +

set/qra <locator> Set your QRA locator +

+

Tell the system what your QRA (or Maidenhead) locator is. If you have not +done a SET/LOCATION then your latitude and longitude will be set roughly +correctly (assuming your locator is correct ;-). For example:- +

+

+
+  SET/QRA JO02LQ
+
+
+

+

8.95 set/qth (0) +

+ +

set/qth <your QTH> Set your QTH +

+

Tell the system where your are. For example:- +

+

+
+  set/qth East Dereham, Norfolk
+
+
+

+

8.96 set/talk (0) +

+ +

set/talk Allow talk messages to be seen at your console +

+

Allow talk messages to arrive at your console. You can switch off +talks with the unset/talk command. +

+

8.97 set/wcy (0) +

+ +

set/wcy Allow WCY messages to be seen at your console +

+

Allow WCY information to be seen at your console. You can switch off +WCY messages with the unset/wcy command. +

+

8.98 set/wwv (0) +

+ +

set/wwv Allow WWV messages to be seen at your console +

+

Allow WWV information to be seen at your console. You can switch off +WWV messages with the unset/wwv command. +

+

8.99 set/wx (0) +

+ +

set/wx Allow WX messages to be seen at your console +

+

Allow WX information to be seen at your console. You can switch off +WX messages with the unset/wx command. +

+

8.100 show/baddx (1) +

+ +

show/baddxShow all the bad dx calls in the system +

+

Display all the bad dx callsigns in the system, see SET/BADDX +for more information. +

+

8.101 show/badnode (6) +

+ +

show/badnode Show all the bad nodes in the system +

+

Display all the bad node callsigns in the system, see SET/BADNODE +for more information. +

+

8.102 show/badspotter (1) +

+ +

show/badspotter Show all the bad spotters in the system +

+

Display all the bad spotter's callsigns in the system, see SET/BADSPOTTER +for more information. +

+

8.103 show/configuration (0) +

+ +

show/configuration [<node>] Show all visible nodes and their users +

+

This command allows you to see all the users that can be seen +and the nodes to which they are connected. With the optional node, +you can specify a particular node to look at. +

This command is normally abbreviated to: sh/c +

BE WARNED: the list that is returned can be VERY long +

+

8.104 show/configuration/node (0) +

+ +

show/configuration/node Show all the nodes connected +

+

Show all the nodes connected locally and the nodes they have connected. +

+

8.105 show/connect (1) +

+ +

show/connect Show all the active connections +

+

This command shows information on all the active connections known to +the node. This command gives slightly more information than WHO. +

+

8.106 show/date (0) +

+ +

show/date [<prefix>|<callsign>] Show +the local time +

+

This is very nearly the same as SHOW/TIME, the only difference the format +of the date string if no arguments are given. +

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. +

+

8.107 show/debug (9) +

+ +

show/debug Show what levels of debug you are logging +

+

The levels can be set with set/debug +

+

8.108 show/dx (0) +

+ +

show/dx [options] interrogate the spot database +

+

If you just type SHOW/DX you will get the last so many spots +(sysop configurable, but usually 10). +

In addition you can add any number of these options in very nearly +any order to the basic SHOW/DX command, they are:- +

+

+
+   
+on <band>       - eg 160m 20m 2m 23cm 6mm
+on <region>     - eg hf vhf uhf shf      (see SHOW/BANDS)
+   
+<number>        - the number of spots you want
+<from>-<to>     - <from> spot no <to> spot no in 
+                  the selected list
+   
+<prefix>        - for a spotted callsign beginning with <prefix>
+*<suffix>       - for a spotted callsign ending in <suffix>
+*<string>*      - for a spotted callsign containing <string>
+   
+day <number>    - starting <number> days ago
+day <from>-<to> - <from> days <to> days ago
+   
+info <text>     - any spots containing <text> in the info or remarks
+   
+by <call>       - any spots spotted by <call> (spotter <call> 
+                        is the same).
+
+qsl             - this automatically looks for any qsl info on the call
+                  held in the spot database.
+
+iota [<iota>]   - If the iota island number is missing it will 
+                  look for the string iota and anything which looks like 
+                  an iota island number. If you specify then it will look 
+                  for that island.
+
+qra [<locator>] - this will look for the specific locator if 
+                  you specify one or else anything that looks like a locator.
+
+
+

e.g. +

+

+
+   
+   SH/DX 9m0
+   SH/DX on 20m info iota
+   SH/DX 9a on vhf day 30
+   SH/DX rf1p qsl
+   SH/DX iota 
+   SH/DX iota eu-064
+   SH/DX qra jn86
+
+
+

+

8.109 show/dxcc (0) +

+ +

show/dxcc <prefix> Interrogate the spot database by country +

+

This command takes the <prefix> (which can be a full or partial +callsign if desired), looks up which internal country number it is +and then displays all the spots as per SH/DX for that country. +

The options for SHOW/DX also apply to this command. +e.g. +

+

+
+   
+   SH/DXCC G
+   SH/DXCC W on 20m info iota
+
+
+

+

8.110 show/files (0) +

+ +

show/files [<filearea> [<string>]] List +the contents of a filearea +

+

SHOW/FILES on its own will show you a list of the various fileareas +available on the system. To see the contents of a particular file +area type:- +

+

+
+   SH/FILES <filearea>
+
+
+

where <filearea> is the name of the filearea you want to see the +contents of. +

You can also use shell globbing characters like '*' and '?' in a +string to see a selection of files in a filearea eg:- +

+

+
+   SH/FILES bulletins arld*
+
+
+

See also TYPE - to see the contents of a file. +

+

8.111 show/filter (0) +

+ +

show/filter Show the filters you have set +

+

Show the contents of all the filters that are set by you. This command +displays all the filters set - for all the various categories. +

+

8.112 show/filter (extended for sysops) (5) +

+ +

show/filter <callsign> Show the filters set by <callsign> +

+

A sysop can look at any filters that have been set. +

+

8.113 show/hops (8) +

+ +

show/hops <node_call> [ann|spots|wcy|wwv|] Show the hop counts for a node +

+

This command shows the hop counts set up for a node. You can specify +which category you want to see. If you leave the category out then +all the categories will be listed. +

+

8.114 show/isolate (1) +

+ +

show/isolate Show a list of isolated nodes +

+

Show which nodes are currently set to be isolated. +

+

8.115 show/lockout (9) +

+ +

show/lockout Show a list of excluded callsigns +

+

Show a list of callsigns that have been excluded (locked out) of the +cluster locally with the set/lockout command

-

I am of course assuming that you have a machine with both DXSpider and -Internet access running. +

8.116 show/log (8) +

+ +

show/log [<callsign>] Show excerpts from the system log +

+

This command outputs a short section of the system log. On its own +it will output a general logfile. With the optional callsign it will +show output from the log associated with that callsign. +

+

8.117 show/moon (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
+
+
+

+

8.118 show/muf (0) +

+ +

show/muf <prefix> [<hours>][long] Show +the likely propagation to <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 +power of 20dBW and receiver sensitivity of -123dBm (about 0.15muV/10dB SINAD) +

The result predicts the most likely operating frequencies and signal +levels for high frequency (shortwave) radio propagation paths on +specified days of the year and hours of the day. It is most useful for +paths between 250 km and 6000 km, but can be used with reduced accuracy +for paths shorter or longer than this. +

The command uses a routine MINIMUF 3.5 developed by the U.S. Navy and +used to predict the MUF given the predicted flux, day of the year, +hour of the day and geographic coordinates of the transmitter and +receiver. This routine is reasonably accurate for the purposes here, +with a claimed RMS error of 3.8 MHz, but much smaller and less complex +than the programs used by major shortwave broadcasting organizations, +such as the Voice of America. +

The command will display some header information detailing its +assumptions, together with the locations, latitude and longitudes and +bearings. It will then show UTC (UT), local time at the other end +(LT), calculate the MUFs, Sun zenith angle at the midpoint of the path +(Zen) and the likely signal strengths. Then for each frequency for which +the system thinks there is a likelihood of a circuit it prints a value. +

The value is currently a likely S meter reading based on the conventional +6dB / S point scale. If the value has a '+' appended it means that it is +1/2 an S point stronger. If the value is preceeded by an 'm' it means that +there is likely to be much fading and by an 's' that the signal is likely +to be noisy. +

By default SHOW/MUF will show the next two hours worth of data. You +can specify anything up to 24 hours worth of data by appending the no of +hours required after the prefix. For example:- +

+

+
+  SH/MUF W
+
+
+

produces: +

+

+
+  RxSens: -123 dBM SFI: 159   R: 193   Month: 10   Day: 21
+  Power :   20 dBW    Distance:  6283 km    Delay: 22.4 ms
+  Location                       Lat / Long           Azim
+  East Dereham, Norfolk          52 41 N 0 57 E         47
+  United-States-W                43 0 N 87 54 W        299
+  UT LT  MUF Zen  1.8  3.5  7.0 10.1 14.0 18.1 21.0 24.9 28.0 50.0
+  18 23 11.5 -35  mS0+ mS2   S3
+  19  0 11.2 -41  mS0+ mS2   S3
+
+
+

indicating that you will have weak, fading circuits on top band and +80m but usable signals on 40m (about S3). +

inputing:- +

+

+
+  SH/MUF W 24
+
+
+

will get you the above display, but with the next 24 hours worth of +propagation data. +

+

+
+  SH/MUF W L 24
+  SH/MUF W 24 Long
+
+
+

Gives you an estimate of the long path propagation characterics. It +should be noted that the figures will probably not be very useful, nor +terrible accurate, but it is included for completeness. +

+

8.119 show/node (1) +

+ +

show/node [<node_call> ...] Show the type and version +number of nodes +

+

Show the type and version (if connected) of the nodes specified on the +command line. If no callsigns are specified then a sorted list of all +the non-user callsigns known to the system will be displayed. +

+

8.120 show/prefix (0) +

+ +

show/prefix <callsign> Interrogate the prefix database +

+

This command takes the <callsign> (which can be a full or partial +callsign or a prefix), looks up which internal country number +it is and then displays all the relevant prefixes for that country +together with the internal country no, the CQ and ITU regions. +

See also SHOW/DXCC +

+

+

8.121 show/program (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. +

+

8.122 show/qra (0) +

+ +

show/qra <locator> [<locator>] Show the distance +between locators
+show/qra <lat> <long> Convert latitude and longitude to a locator
+

+

This is a multipurpose command that allows you either to calculate the +distance and bearing between two locators or (if only one locator is +given on the command line) the distance and beraing from your station +to the locator. For example:- +

+

+
+SH/QRA IO92QL 
+SH/QRA JN06 IN73
+
+
+

The first example will show the distance and bearing to the locator from +yourself, the second example will calculate the distance and bearing from +the first locator to the second. You can use 4 or 6 character locators. +

It is also possible to convert a latitude and longitude to a locator by +using this command with a latitude and longitude as an argument, for +example:- +

+

+
+SH/QRA 52 41 N 0 58 E
+
+
+

+

8.123 show/qrz (0) +

+ +

show/qrz <callsign> Show any callbook details on a callsign +

+

This command queries the QRZ callbook server on the internet +and returns any information available for that callsign. This service +is provided for users of this software by http://www.qrz.com +

+

8.124 show/route (0) +

+ +

show/route <callsign> Show the route to <callsign> +

+

This command allows you to see to which node the callsigns specified are +connected. It is a sort of inverse sh/config. +

+

+
+  sh/route n2tly
+
+
+

+

8.125 show/satellite (0) +

+ +

show/satellite <name> [<hours> <interval>] +Show satellite tracking data +

+

Show the tracking data from your location to the satellite of your choice +from now on for the next few hours. +

If you use this command without a satellite name it will display a list +of all the satellites known currently to the system. +

If you give a name then you can obtain tracking data of all the passes +that start and finish 5 degrees below the horizon. As default it will +give information for the next three hours for every five minute period. +

You can alter the number of hours and the step size, within certain +limits. +

Each pass in a period is separated with a row of '-----' characters +

So for example:-

-

BEFORE YOU EVEN CONSIDER STARTING WITH THIS MAKE A BACKUP OF YOUR -ENTIRE SPIDER TREE!! +

+
+SH/SAT AO-10 
+SH/SAT FENGYUN1 12 2
+
+

-

Assuming you are connected to the Internet, you need to login to the -CVS repository and then update your Spider source. There are several -steps which are listed below ... +

8.126 show/sun (0) +

+ +

show/sun [<prefix>|<callsign>] Show +sun rise and set times

-

First login as the user sysop. Next you need to connect to the CVS -repository. You do this with the command below ... +

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:-

+

-cvs -d:pserver:anonymous@cvs.DXSpider.sourceforge.net:/cvsroot/dxspider login 
+  SH/SUN
+  SH/SUN G1TLH K9CW ZS
 
-

You will get a password prompt. Simply hit return here and your machine should -return to a normal linux prompt. +

+

+

8.127 show/time (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. +

+

8.128 show/wcy (0) +

+ +

show/wcy Show the last 10 WCY broadcasts
+show/wcy <n> Show the last <n> WCY broadcasts
+

+

Display the most recent WCY information that has been received by the system +

+

8.129 show/wwv (0) +

+ +

show/wwv Show the last 10 WWV broadcasts
+show/wwv <n> Show the last <n> WWV broadcasts
+

+

Display the most recent WWV information that has been received by the system +

+

+

8.130 shutdown (5) +

+ +

shutdown Shutdown the cluster +

+

Shutdown the cluster and disconnect all the users. If you have Spider +set to respawn in /etc/inittab it will of course restart. +

+

8.131 spoof (9) +

+ +

spoof <callsign> <command> Run commands as another user +

+

This is a very simple yet powerful command for the sysop. It allows you to +issue commands as if you were a different user. This is very useful for the +kind of things that users seem to always get wrong.. like home_node for +example. +

+

8.132 stat/db (5) +

+ +

stat/db <dbname> Show the status of a database +

+

Show the internal status of a database descriptor. +

Depending on your privilege level you will see more or less information. +This command is unlikely to be of much use to anyone other than a sysop.

-

What happens next depends on whether you have an existing installation that -you want to update with the latest and greatest or whether you just want -to see what is there and/or run it on a new machine for testing. -

If you are installing Spider from CVS then change directory to /home/sysop -

If you are wanting to update Spider then cd to /tmp +

8.133 stat/channel (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. +

+

8.134 stat/msg (5) +

+ +

stat/msg <msgno> Show the status of a message +

+

This command shows the internal status of a message and includes information +such as to whom it has been forwarded, its size, origin etc etc. +

+

8.135 stat/user (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.

-

The next step will create a brand new 'spider' directory in your current -directory. +

8.136 sysop (0) +

+ +

sysop Regain your privileges if you login remotely +

+

The system automatically reduces your privilege level to that of a +normal user if you login in remotely. This command allows you to +regain your normal privilege level. It uses the normal system: five +numbers are returned that are indexes into the character array that is +your assigned password (see SET/PASSWORD). The indexes start from +zero. +

You are expected to return a string which contains the characters +required in the correct order. You may intersperse those characters +with others to obscure your reply for any watchers. For example (and +these values are for explanation :-):

+

-cvs -z3 -d:pserver:anonymous@cvs.DXSpider.sourceforge.net:/cvsroot/dxspider co spider
+  password = 012345678901234567890123456789
+  > sysop
+  22 10 15 17 3
 
-

This command is all on one line. +

+

you type:-

-

Hopefully your screen should show you downloading files. The -z3 simply compresses -the download to improve speed. -When this has finished, you will have exactly the same as if you had untarred a full -tarball PLUS some extra directories and files that CVS needs to do the magic that -it does. +

+
+ aa2bbbb0ccc5ddd7xxx3n
+ or 2 0 5 7 3
+ or 20573
+
+
+

They will all match. If there is no password you will still be offered +numbers but nothing will happen when you input a string. Any match is +case sensitive.

-

Now if you are doing a new installation, that's it. Carry on as if you have -just downloaded and untarred the lastest tarball. +

8.137 talk (0) +

+ +

talk <callsign> Enter talk mode with <callsign>
+talk <callsign> <text> Send a text message to <callsign>
+talk <callsign> > <node_call> [<text>] +Send a text message to <callsign> via <node_call>

-

If you want to upgrade your current installation then do this ... +

Send a short message to any other station that is visible on the cluster +system. You can send it to anyone you can see with a SHOW/CONFIGURATION +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 logging on and off the cluster. +

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. +

If you want to have a ragchew with someone you can leave the text message +out and the system will go into 'Talk' mode. What this means is that a +short message is sent to the recipient telling them that you are in a 'Talking' +frame of mind and then you just type - everything you send will go to the +station that you asked for. +

All the usual announcements, spots and so on will still come out on your +terminal. +

If you want to do something (such as send a spot) you precede the normal +command with a '/' character, eg:-

-tar cvfz /tmp/s.tgz spider
-cd /
-tar xvfzp /tmp/s.tgz
+   /DX 14001 G1TLH What's a B class licensee doing on 20m CW?
+   /HELP talk
 
-

This is assuming you downloaded to the /tmp directory of course. +

To leave talk mode type:

-

NOTE: the 'p' on the end of the 'xvfz' is IMPORTANT! It keeps the permissions -correct. YOU WERE LOGGED IN AS THE USER SYSOP WEREN'T YOU????? -

Remember to recompile the C client (cd /spider/src; make) +

+
+   /EX
+
+

-

At this point the files have been upgraded. You can (usually) restart the cluster -in your own time. However, if you attempt to use any new commands or features -expect it to be fatal! At least your cluster will have been restarted then so it -will be too late to worry about it! +

8.138 type (0) +

+ +

type <filearea>/<name> Look at a file in one of the fileareas

-

Now the magic part! From now on when you want to update, simply connect to the -Internet and then, as the user sysop ... +

Type out the contents of a file in a filearea. So, for example, in +filearea 'bulletins' you want to look at file 'arld051' you would +enter:-

-cd /spider
-cvs -z3 update -d
+   TYPE bulletins/arld051
 
-

and your files will be updated. As above, remember to recompile the "C" client -if it has been updated (CVS will tell you) and restart if any of the perl scripts -have been altered or added, again, CVS will tell you. +

See also SHOW/FILES to see what fileareas are available and a +list of content. +

+

8.139 who (0) +

+ +

who Show who is physically connected locally +

+

This is a quick listing that shows which callsigns are connected and +what sort of connection they have +

+

8.140 wx (0) +

+ +

wx <text> Send a weather message to local users
+wx full <text> Send a weather message to all cluster users
+

+

Weather messages can sometimes be useful if you are experiencing an extreme +that may indicate enhanced conditions +

+

8.141 wx (enhanced for sysops) (5) +

+ +

wx sysop <text> Send a weather message to other clusters only +

+

Send a weather message only to other cluster nodes and not to general users. +

-

You will find any changes documented in the /spider/Changes file.


-Next +Next Previous Contents diff --git a/html/adminmanual.html b/html/adminmanual.html index 80dd032f..f986c0d8 100644 --- a/html/adminmanual.html +++ b/html/adminmanual.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47 + The DXSpider Administration Manual v1.48 @@ -13,228 +13,224 @@ Previous Contents
-

The DXSpider Administration Manual v1.47

+

The DXSpider Administration Manual v1.48

-

Ian Maude, G0VGS, (ianmaude@btinternet.com)

Version 1.47 April 2001 revision 1.0 +

Ian Maude, G0VGS, (ianmaude@btinternet.com)

Version 1.48 August 2001 revision 1.1


A reference for SysOps of the DXSpider DXCluster program.

-

1. Hop control

+

1. Routing and Filtering

-

2. Filtering (Old Style upto v1.44)

+

2. Other filters

-

3. Filtering (New Style v1.45 and later)

+

3. Mail

-

4. Other filters

+

4. Databases

-

5. Mail

+

5. Information, files and useful programs

-

6. Databases

- - -

-

7. Information, files and useful programs

- - -

-

8. CVS

+

6. CVS

-

9. The DXSpider command set

+

7. The DXSpider command set


Next diff --git a/html/installation-1.html b/html/installation-1.html index a22d7b69..c9dcbc38 100644 --- a/html/installation-1.html +++ b/html/installation-1.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: Linux Installation + The DXSpider Installation Manual v1.48: Linux Installation @@ -40,16 +40,70 @@ following modules from

-

Do get the latest versions of these packages and install them -but use the above list as the earliest versions usable. +

Copy the CPAN modules listed above to a convenient place on your computer. One good place would be /usr/local/packages, and the instructions which follow will assume that that's where you have put them. +

+

Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: - +

+

+# tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz
+# cd Data-Dumper-2.10
+# perl Makefile.PL
+# make test
+# make install
+# cd ..
+#
+# tar xvfz /usr/local/packages/TimeDate-1.10.tar.gz
+# cd TimeDate-1.10
+# perl Makefile.PL
+# make test
+# make install
+# cd ..
+#
+# tar xvfz /usr/local/packages/IO-1.20.tar.gz
+# cd IO-1.20
+# perl Makefile.PL
+# make test
+# make install UNINST=1
+# cd ..
+#
+# tar xvfz /usr/local/packages/Net-Telnet-3.02.tar.gz
+# cd Net-Telnet-3.02
+# perl Makefile.PL
+# make test
+# make install
+# cd ..
+#
+# tar xvfz /usr/local/packages/Curses-1.05.tar.gz
+# cd Curses-1.05
+# perl Makefile.PL
+# make test
+# make install
+# cd ..
+#
+# tar xvfz /usr/local/packages/Time-HiRes-01.20.tar.gz 
+# cd Time-HiRes-01.20
+# perl Makefile.PL
+# make test
+# make install
+# cd ..
+
+

+

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. +

1.2 Preparation

diff --git a/html/installation-2.html b/html/installation-2.html index 64446bd2..31718650 100644 --- a/html/installation-2.html +++ b/html/installation-2.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: Linux quick installation guide + The DXSpider Installation Manual v1.48: Linux quick installation guide diff --git a/html/installation-3.html b/html/installation-3.html index 7e426123..165d01c2 100644 --- a/html/installation-3.html +++ b/html/installation-3.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: Configuration + The DXSpider Installation Manual v1.48: Configuration diff --git a/html/installation-4.html b/html/installation-4.html index 875c5056..f74b989f 100644 --- a/html/installation-4.html +++ b/html/installation-4.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: Microsoft Windows Installation + The DXSpider Installation Manual v1.48: Microsoft Windows Installation diff --git a/html/installation-5.html b/html/installation-5.html index fde7e8fb..1ce906cc 100644 --- a/html/installation-5.html +++ b/html/installation-5.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: Installing the software + The DXSpider Installation Manual v1.48: Installing the software diff --git a/html/installation-6.html b/html/installation-6.html index d1378c81..1843ddcc 100644 --- a/html/installation-6.html +++ b/html/installation-6.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47: General Information + The DXSpider Installation Manual v1.48: General Information diff --git a/html/installation.html b/html/installation.html index 21078be9..59bc158d 100644 --- a/html/installation.html +++ b/html/installation.html @@ -2,7 +2,7 @@ - The DXSpider Installation Manual v1.47 + The DXSpider Installation Manual v1.48 @@ -13,10 +13,10 @@ Previous Contents
-

The DXSpider Installation Manual v1.47

+

The DXSpider Installation Manual v1.48

Iain Philipps, G0RDI (g0rdi@77hz.com) and -Ian Maude, G0VGS, (ianmaude@btinternet.com)

Version 1.47, April 2001 revision 1.0 +Ian Maude, G0VGS, (ianmaude@btinternet.com)Version 1.48, July 2001 revision 1.1


A reference for SysOps of the DXSpider DXCluster program.
diff --git a/perl/AGWMsg.pm b/perl/AGWMsg.pm index a3253a5e..2e74da7b 100644 --- a/perl/AGWMsg.pm +++ b/perl/AGWMsg.pm @@ -50,10 +50,10 @@ sub init $rproc = shift; finish(); - dbg('err', "AGW initialising and connecting to $addr/$port ..."); + dbg("AGW initialising and connecting to $addr/$port ..."); $sock = IO::Socket::INET->new(PeerAddr => $addr, PeerPort => $port, Proto=>'tcp', Timeout=>15); unless ($sock) { - dbg('err', "Cannot connect to AGW Engine at $addr/$port $!"); + dbg("Cannot connect to AGW Engine at $addr/$port $!"); return; } Msg::blocking($sock, 0); @@ -83,7 +83,7 @@ sub finish return if $finishing; if ($sock) { $finishing = 1; - dbg('err', "AGW ending..."); + dbg("AGW ending..."); for (values %circuit) { &{$_->{eproc}}() if $_->{eproc}; $_->disconnect; @@ -114,15 +114,15 @@ sub _sendf $len = length $data; if ($sort eq 'y' || $sort eq 'H') { - dbg('agwpoll', "AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$data\""); + dbg("AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$data\"") if isdbg('agwpoll'); } elsif ($sort eq 'D') { if (isdbg('agw')) { my $d = $data; $d =~ s/\cM$//; - dbg('agw', "AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$d\""); + dbg("AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$d\"") if isdbg('agw'); } } else { - dbg('agw', "AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$data\""); + dbg("AGW sendf: $sort '${from}'->'${to}' port: $port pid: $pid \"$data\"") if isdbg('agw'); } push @outqueue, pack('C x3 a1 x1 C x1 a10 a10 V x4 a*', $port, $sort, $pid, $from, $to, $len, $data); Msg::set_event_handler($sock, write=>\&_send); @@ -213,7 +213,7 @@ FINISH: sub _error { - dbg('err', "error on AGW connection $addr/$port $!"); + dbg("error on AGW connection $addr/$port $!"); Msg::set_event_handler($sock, read=>undef, write=>undef, error=>undef); $sock = undef; for (%circuit) { @@ -233,7 +233,7 @@ sub _decode # do a sanity check on the length if ($len > 2000) { - dbg('err', "AGW: invalid length $len > 2000 received ($sort $port $pid '$from'->'$to')"); + dbg("AGW: invalid length $len > 2000 received ($sort $port $pid '$from'->'$to')"); finish(); return; } @@ -261,13 +261,13 @@ sub _decode if ($sort eq 'D') { my $d = unpack "Z*", $data; $d =~ s/\cM$//; - dbg('agw', "AGW Data In port: $port pid: $pid '$from'->'$to' length: $len \"$d\""); + dbg("AGW Data In port: $port pid: $pid '$from'->'$to' length: $len \"$d\"") if isdbg('agw'); my $conn = _find($from eq $main::mycall ? $to : $from); if ($conn) { if ($conn->{state} eq 'WC') { if (exists $conn->{cmd}) { if (@{$conn->{cmd}}) { - dbg('connect', $d); + dbg($d) if isdbg('connect'); $conn->_docmd($d); } } @@ -285,7 +285,7 @@ sub _decode } } } else { - dbg('err', "AGW error Unsolicited Data!"); + dbg("AGW error Unsolicited Data!"); } } elsif ($sort eq 'I' || $sort eq 'S' || $sort eq 'U' || $sort eq 'M' || $sort eq 'T') { my $d = unpack "Z*", $data; @@ -294,12 +294,12 @@ sub _decode for (@lines) { s/([\x00-\x1f\x7f-\xff])/sprintf("%%%02X", ord($1))/eg; - dbg('agw', "AGW Monitor port: $port \"$_\""); + dbg("AGW Monitor port: $port \"$_\"") if isdbg('agw'); } } elsif ($sort eq 'C') { my $d = unpack "Z*", $data; $d =~ s/\cM$//; - dbg('agw', "AGW Connect port: $port pid: $pid '$from'->'$to' \"$d\""); + dbg("AGW Connect port: $port pid: $pid '$from'->'$to' \"$d\"") if isdbg('agw'); my $call = $from eq $main::mycall ? $to : $from; my $conn = _find($call); if ($conn) { @@ -334,7 +334,7 @@ sub _decode } elsif ($sort eq 'd') { my $d = unpack "Z*", $data; $d =~ s/\cM$//; - dbg('agw', "AGW '$from'->'$to' port: $port Disconnected ($d)"); + dbg("AGW '$from'->'$to' port: $port Disconnected ($d)") if isdbg('agw'); my $conn = _find($from eq $main::mycall ? $to : $from); if ($conn) { &{$conn->{eproc}}() if $conn->{eproc}; @@ -342,36 +342,36 @@ sub _decode } } elsif ($sort eq 'y') { my ($frames) = unpack "V", $data; - dbg('agwpollans', "AGW Frames Outstanding on port $port = $frames"); + dbg("AGW Frames Outstanding on port $port = $frames") if isdbg('agwpollans'); my $conn = _find($from); $conn->{oframes} = $frames if $conn; } elsif ($sort eq 'Y') { my ($frames) = unpack "V", $data; - dbg('agw', "AGW Frames Outstanding on circuit '$from'->'$to' = $frames"); + dbg("AGW Frames Outstanding on circuit '$from'->'$to' = $frames") if isdbg('agw'); my $conn = _find($from eq $main::mycall ? $to : $from); $conn->{oframes} = $frames if $conn; } elsif ($sort eq 'H') { unless ($from =~ /^\s+$/) { my $d = unpack "Z*", $data; $d =~ s/\cM$//; - dbg('agw', "AGW Heard port: $port \"$d\""); + dbg("AGW Heard port: $port \"$d\"") if isdbg('agw'); } } elsif ($sort eq 'X') { my ($r) = unpack "C", $data; $r = $r ? "Successful" : "Failed"; - dbg('err', "AGW Register $from $r"); + dbg("AGW Register $from $r"); finish() unless $r; } elsif ($sort eq 'R') { my ($major, $minor) = unpack "v x2 v x2", $data; - dbg('agw', "AGW Version $major.$minor"); + dbg("AGW Version $major.$minor") if isdbg('agw'); } elsif ($sort eq 'G') { my @ports = split /;/, $data; $noports = shift @ports || '0'; - dbg('agw', "AGW $noports Ports available"); + dbg("AGW $noports Ports available") if isdbg('agw'); pop @ports while @ports > $noports; for (@ports) { next unless $_; - dbg('agw', "AGW Port: $_"); + dbg("AGW Port: $_") if isdbg('agw'); } for (my $i = 0; $i < $noports; $i++) { _sendf('y', undef, undef, $i); @@ -379,7 +379,7 @@ sub _decode } } else { my $d = unpack "Z*", $data; - dbg('agw', "AGW decode $sort port: $port pid: $pid '$from'->'$to' length: $len \"$d\""); + dbg("AGW decode $sort port: $port pid: $pid '$from'->'$to' length: $len \"$d\"") if isdbg('agw'); } } } @@ -436,7 +436,7 @@ sub enqueue # _sendf('Y', $main::mycall, $conn->{call}, $conn->{agwport}, $conn->{agwpid}); _sendf('D', $main::mycall, $conn->{agwcall}, $conn->{agwport}, $conn->{agwpid}, $msg . $conn->{lineend}); my $len = length($msg) + 1; - dbg('agw', "AGW Data Out port: $conn->{agwport} pid: $conn->{agwpid} '$main::mycall'->'$conn->{agwcall}' length: $len \"$msg\""); + dbg("AGW Data Out port: $conn->{agwport} pid: $conn->{agwpid} '$main::mycall'->'$conn->{agwcall}' length: $len \"$msg\"") if isdbg('agw'); } } diff --git a/perl/AnnTalk.pm b/perl/AnnTalk.pm index b7eb1311..f9fd7828 100644 --- a/perl/AnnTalk.pm +++ b/perl/AnnTalk.pm @@ -31,9 +31,9 @@ $filterdef = bless ([ ['by_dxcc', 'n', 7], ['by_itu', 'n', 8], ['by_zone', 'n', 9], - ['origin_dxcc', 'c', 10], - ['origin_itu', 'c', 11], - ['origin_itu', 'c', 12], + ['origin_dxcc', 'n', 10], + ['origin_itu', 'n', 11], + ['origin_itu', 'n', 12], ], 'Filter::Cmd'); diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm index 8a300d5f..be5feee3 100644 --- a/perl/DXChannel.pm +++ b/perl/DXChannel.pm @@ -31,6 +31,7 @@ use DXUtil; use DXVars; use DXDebug; use Filter; +use Prefix; use strict; use vars qw(%channels %valid @ISA $count); @@ -58,7 +59,7 @@ $count = 0; talk => '0,Want Talk,yesno', ann => '0,Want Announce,yesno', here => '0,Here?,yesno', - confmode => '0,In Conference?,yesno', + conf => '0,In Conference?,yesno', dx => '0,DX Spots,yesno', redirect => '0,Redirect messages to', lang => '0,Language', @@ -77,10 +78,12 @@ $count = 0; wwvfilter => '5,WWV Filter', wcyfilter => '5,WCY Filter', spotsfilter => '5,Spot Filter', + routefilter => '5,route Filter', inannfilter => '5,Input Ann Filter', inwwvfilter => '5,Input WWV Filter', inwcyfilter => '5,Input WCY Filter', inspotsfilter => '5,Input Spot Filter', + inroutefilter => '5,Input Route Filter', passwd => '9,Passwd List,parray', pingint => '5,Ping Interval ', nopings => '5,Ping Obs Count', @@ -93,6 +96,11 @@ $count = 0; isbasic => '9,Internal Connection', errors => '9,Errors', route => '9,Route Data', + dxcc => '0,Country Code', + itu => '0,ITU Zone', + cq => '0,CQ Zone', + enhanced => '5,Enhanced Client,yesno', + senddbg => '8,Sending Debug,yesno', ); # object destruction @@ -104,7 +112,7 @@ sub DESTROY delete $self->{$_}; } } - dbg('chan', "DXChannel $self->{call} destroyed ($count)"); + dbg("DXChannel $self->{call} destroyed ($count)") if isdbg('chan'); $count--; } @@ -131,8 +139,16 @@ sub alloc $self->{lang} = $main::lang if !$self->{lang}; $self->{func} = ""; + # add in all the dxcc, itu, zone info + my @dxcc = Prefix::extract($call); + if (@dxcc > 0) { + $self->{dxcc} = $dxcc[1]->dxcc; + $self->{itu} = $dxcc[1]->itu; + $self->{cq} = $dxcc[1]->cq; + } + $count++; - dbg('chan', "DXChannel $self->{call} created ($count)"); + dbg("DXChannel $self->{call} created ($count)") if isdbg('chan'); bless $self, $pkg; return $channels{$call} = $self; } @@ -283,7 +299,30 @@ sub send_now my @lines = split /\n/; for (@lines) { $conn->send_now("$sort$call|$_"); - dbg('chan', "-> $sort $call $_"); + dbg("-> $sort $call $_") if isdbg('chan'); + } + } + $self->{t} = time; +} + +# +# send later with letter (more control) +# + +sub send_later +{ + my $self = shift; + my $conn = $self->{conn}; + return unless $conn; + my $sort = shift; + my $call = $self->{call}; + + for (@_) { +# chomp; + my @lines = split /\n/; + for (@lines) { + $conn->send_later("$sort$call|$_"); + dbg("-> $sort $call $_") if isdbg('chan'); } } $self->{t} = time; @@ -304,7 +343,7 @@ sub send # this is always later and always data my @lines = split /\n/; for (@lines) { $conn->send_later("D$call|$_"); - dbg('chan', "-> D $call $_"); + dbg("-> D $call $_") if isdbg('chan'); } } $self->{t} = time; @@ -352,7 +391,7 @@ sub state $self->{oldstate} = $self->{state}; $self->{state} = shift; $self->{func} = '' unless defined $self->{func}; - dbg('state', "$self->{call} channel func $self->{func} state $self->{oldstate} -> $self->{state}\n"); + dbg("$self->{call} channel func $self->{func} state $self->{oldstate} -> $self->{state}\n") if isdbg('state'); # if there is any queued up broadcasts then splurge them out here if ($self->{delayed} && ($self->{state} eq 'prompt' || $self->{state} eq 'talk')) { @@ -439,12 +478,12 @@ sub decode_input # the above regexp must work unless (defined $sort && defined $call && defined $line) { # $data =~ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg; - dbg('err', "DUFF Line on $chcall: $data"); + dbg("DUFF Line on $chcall: $data") if isdbg('err'); return (); } if(ref($dxchan) && $call ne $chcall) { - dbg('err', "DUFF Line come in for $call on wrong channel $chcall" ); + dbg("DUFF Line come in for $call on wrong channel $chcall") if isdbg('err'); return(); } diff --git a/perl/DXCluster.pm b/perl/DXCluster.pm index 1b810654..36d1d20f 100644 --- a/perl/DXCluster.pm +++ b/perl/DXCluster.pm @@ -155,7 +155,7 @@ sub mynode unless ($noderef) { my $mynode = $self->{mynode}; my $call = $self->{call}; - dbg('err', "parent node $mynode has disappeared from $call" ); + dbg("parent node $mynode has disappeared from $call") if isdbg('err'); } } return $noderef; @@ -173,7 +173,7 @@ sub dxchan unless ($dxchan) { my $dxcall = $self->{dxchancall}; my $call = $self->{call}; - dbg('err', "parent dxchan $dxcall has disappeared from $call" ); + dbg("parent dxchan $dxcall has disappeared from $call") if isdbg('err'); } } return $dxchan; @@ -216,7 +216,7 @@ sub new my $self = $pkg->alloc($dxchan, $call, $confmode, $here); $self->{mynode} = $node->call; $node->add_user($call, $self); - dbg('cluster', "allocating user $call to $node->{call} in cluster\n"); + dbg("allocating user $call to $node->{call} in cluster\n") if isdbg('cluster'); return $self; } @@ -227,7 +227,7 @@ sub del my $node = $self->mynode; $node->del_user($call); - dbg('cluster', "deleting user $call from $node->{call} in cluster\n"); + dbg("deleting user $call from $node->{call} in cluster\n") if isdbg('cluster'); } sub count @@ -264,7 +264,7 @@ sub new $self->{mynode} = $self->call; # for sh/station $self->{users} = 0; $nodes++; - dbg('cluster', "allocating node $call to cluster\n"); + dbg("allocating node $call to cluster\n") if isdbg('cluster'); return $self; } @@ -290,7 +290,7 @@ sub del $ref->del(); # this also takes them out of this list } delete $DXCluster::cluster{$call}; # remove me from the cluster table - dbg('cluster', "deleting node $call from cluster\n"); + dbg("deleting node $call from cluster\n") if isdbg('cluster'); $users -= $self->{users}; # it may be PC50 updated only therefore > 0 $users = 0 if $users < 0; $nodes--; diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index fc43a4e1..eef342bc 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -32,7 +32,7 @@ use Sun; use Internet; use strict; -use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors); +use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug); %Cache = (); # cache of dynamically loaded routine's mod times %cmd_cache = (); # cache of short names @@ -48,6 +48,13 @@ $maxerrors = 20; # the maximum number of concurrent errors allowed before dis sub new { my $self = DXChannel::alloc(@_); + + # routing, this must go out here to prevent race condx + my $pkg = shift; + my $call = shift; + my @rout = $main::routeroot->add_user($call, Route::here(1)); + DXProt::route_pc16($DXProt::me, $main::routeroot, @rout) if @rout; + return $self; } @@ -98,26 +105,10 @@ sub start $user->qra(DXBearing::lltoqra($lat, $long)) if (defined $lat && defined $long); } - # add yourself to the database - my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database"; - my $cuser = DXNodeuser->new($self, $node, $call, 0, 1); - $node->dxchan($self) if $call eq $main::myalias; # send all output for mycall to myalias - - # routing version - my $pref = Route::Node::get($main::mycall) or die "$main::mycall not allocated in Route database"; - $pref->add_user($call, Route::here($self->{here})); - dbg('route', "B/C PC16 on $main::mycall for: $call"); - - # issue a pc16 to everybody interested - my $nchan = DXChannel->get($main::mycall); - my @pc16 = DXProt::pc16($nchan, $cuser); - for (@pc16) { - DXProt::broadcast_all_ak1a($_); - } Log('DXCommand', "$call connected"); # send prompts and things - my $info = DXCluster::cluster(); + my $info = Route::cluster(); $self->send("Cluster:$info"); $self->send($self->msg('namee1')) if !$user->name; $self->send($self->msg('qthe1')) if !$user->qth; @@ -227,7 +218,7 @@ sub send_talks my ($to, $via) = $ent =~ /(\S+)>(\S+)/; $to = $ent unless $to; my $call = $via ? $via : $to; - my $clref = DXCluster->get_exact($call); + my $clref = Route::get($call); my $dxchan = $clref->dxchan if $clref; if ($dxchan) { $dxchan->talk($self->{call}, $to, $via, $line); @@ -276,7 +267,11 @@ sub send_ans $self->send($self->msg('page', scalar @_)); } else { for (@_) { - $self->send($_) if $_; + if (defined $_) { + $self->send($_); + } else { + $self->send(''); + } } } } @@ -295,7 +290,7 @@ sub run_cmd if ($self->{func}) { my $c = qq{ \@ans = $self->{func}(\$self, \$cmdline) }; - dbg('eval', "stored func cmd = $c\n"); + dbg("stored func cmd = $c\n") if isdbg('eval'); eval $c; if ($@) { return ("Syserr: Eval err $errstr on stored func $self->{func}", $@); @@ -315,14 +310,14 @@ sub run_cmd my ($path, $fcmd); - dbg('command', "cmd: $cmd"); + dbg("cmd: $cmd") if isdbg('command'); # alias it if possible my $acmd = CmdAlias::get_cmd($cmd); if ($acmd) { ($cmd, $args) = split /\s+/, "$acmd $args", 2; $args = "" unless defined $args; - dbg('command', "aliased cmd: $cmd $args"); + dbg("aliased cmd: $cmd $args") if isdbg('command'); } # first expand out the entry to a command @@ -330,13 +325,13 @@ sub run_cmd ($path, $fcmd) = search($main::cmd, $cmd, "pl") if !$path || !$fcmd; if ($path && $cmd) { - dbg('command', "path: $cmd cmd: $fcmd"); + dbg("path: $cmd cmd: $fcmd") if isdbg('command'); my $package = find_cmd_name($path, $fcmd); @ans = (0) if !$package ; if ($package) { - dbg('command', "package: $package"); + dbg("package: $package") if isdbg('command'); my $c; unless (exists $Cache{$package}->{'sub'}) { $c = eval $Cache{$package}->{'eval'}; @@ -356,7 +351,7 @@ sub run_cmd }; } } else { - dbg('command', "cmd: $cmd not found"); + dbg("cmd: $cmd not found") if isdbg('command'); if (++$self->{errors} > $maxerrors) { $self->send($self->msg('e26')); $self->disconnect; @@ -400,6 +395,12 @@ sub process $dxchan->t($t); } } + + while (my ($k, $v) = each %nothereslug) { + if ($main::systime >= $v + 300) { + delete $nothereslug{$k}; + } + } } # @@ -409,30 +410,21 @@ sub disconnect { my $self = shift; my $call = $self->call; - - # reset the redirection of messages back to 'normal' if we are the sysop - if ($call eq $main::myalias) { - my $node = DXNode->get($main::mycall) or die "$main::mycall not allocated in DXNode database"; - $node->dxchan($DXProt::me); - } + delete $self->{senddbg}; my @rout = $main::routeroot->del_user($call); - dbg('route', "B/C PC17 on $main::mycall for: $call"); + dbg("B/C PC17 on $main::mycall for: $call") if isdbg('route'); + + # issue a pc17 to everybody interested + DXProt::route_pc17($DXProt::me, $main::routeroot, @rout) if @rout; # I was the last node visited $self->user->node($main::mycall); - # issue a pc17 to everybody interested - my $nchan = DXChannel->get($main::mycall); - my $pc17 = $nchan->pc17($self); - DXProt::broadcast_all_ak1a($pc17); - # send info to all logged in thingies $self->tell_login('logoutu'); Log('DXCommand', "$call disconnected"); - my $ref = DXCluster->get_exact($call); - $ref->del() if $ref; $self->SUPER::disconnect; } @@ -452,15 +444,10 @@ sub broadcast { my $pkg = shift; # ignored my $s = shift; # the line to be rebroadcast - my @except = @_; # to all channels EXCEPT these (dxchannel refs) - my @list = DXChannel->get_all(); # just in case we are called from some funny object - my ($dxchan, $except); - L: foreach $dxchan (@list) { - next if !$dxchan->sort eq 'U'; # only interested in user channels - foreach $except (@except) { - next L if $except == $dxchan; # ignore channels in the 'except' list - } + foreach my $dxchan (DXChannel->get_all()) { + next unless $dxchan->{sort} eq 'U'; # only interested in user channels + next if grep $dxchan == $_, @_; $dxchan->send($s); # send it } } @@ -468,13 +455,7 @@ sub broadcast # gimme all the users sub get_all { - my @list = DXChannel->get_all(); - my $ref; - my @out; - foreach $ref (@list) { - push @out, $ref if $ref->sort eq 'U'; - } - return @out; + return grep {$_->{sort} eq 'U'} DXChannel->get_all(); } # run a script for this user @@ -496,7 +477,7 @@ sub search # commands are lower case $short_cmd = lc $short_cmd; - dbg('command', "command: $path $short_cmd\n"); + dbg("command: $path $short_cmd\n") if isdbg('command'); # do some checking for funny characters return () if $short_cmd =~ /\/$/; @@ -504,7 +485,7 @@ sub search # return immediately if we have it ($apath, $acmd) = split ',', $cmd_cache{$short_cmd} if $cmd_cache{$short_cmd}; if ($apath && $acmd) { - dbg('command', "cached $short_cmd = ($apath, $acmd)\n"); + dbg("cached $short_cmd = ($apath, $acmd)\n") if isdbg('command'); return ($apath, $acmd); } @@ -526,7 +507,7 @@ sub search next if $l =~ /^\./; if ($i < $#parts) { # we are dealing with directories if ((-d "$curdir/$l") && $p eq substr($l, 0, length $p)) { - dbg('command', "got dir: $curdir/$l\n"); + dbg("got dir: $curdir/$l\n") if isdbg('command'); $dirfn .= "$l/"; $curdir .= "/$l"; last; @@ -540,7 +521,7 @@ sub search # chop $dirfn; # remove trailing / $dirfn = "" unless $dirfn; $cmd_cache{"$short_cmd"} = join(',', ($path, "$dirfn$l")); # cache it - dbg('command', "got path: $path cmd: $dirfn$l\n"); + dbg("got path: $path cmd: $dirfn$l\n") if isdbg('command'); return ($path, "$dirfn$l"); } } @@ -639,7 +620,7 @@ sub find_cmd_name { my @list = split /\n/, $eval; my $line; for (@list) { - dbg('eval', $_, "\n"); + dbg($_ . "\n") if isdbg('eval'); } } @@ -649,26 +630,138 @@ sub find_cmd_name { return $package; } +sub local_send +{ + my ($self, $let, $buf) = @_; + if ($self->{state} eq 'prompt' || $self->{state} eq 'talk') { + if ($self->{enhanced}) { + $self->send_later($let, $buf); + } else { + $self->send($buf); + } + } else { + $self->delay($buf); + } +} + # send a talk message here sub talk { my ($self, $from, $to, $via, $line) = @_; $line =~ s/\\5E/\^/g; - $self->send("$to de $from: $line") if $self->{talk}; + $self->send_later('T', "$to de $from: $line") if $self->{talk}; Log('talk', $to, $from, $main::mycall, $line); + # send a 'not here' message if required + unless ($self->{here} && $from ne $to) { + my $key = "$to$from"; + unless (exists $nothereslug{$key}) { + my ($ref, $dxchan); + if (($ref = Route::get($from)) && ($dxchan = $ref->dxchan)) { + my $name = $self->user->name || $to; + my $s = $self->user->nothere || $dxchan->msg('nothere', $name); + $nothereslug{$key} = $main::systime; + $dxchan->talk($to, $from, undef, $s); + } + } + } } # send an announce sub announce { + my $self = shift; + my $line = shift; + my $isolate = shift; + my $to = shift; + my $target = shift; + my $text = shift; + my ($filter, $hops); + + if ($self->{annfilter}) { + ($filter, $hops) = $self->{annfilter}->it(@_ ); + return unless $filter; + } + unless ($self->{ann}) { + return if $_[0] ne $main::myalias && $_[0] ne $main::mycall; + } + return if $target eq 'SYSOP' && $self->{priv} < 5; + my $buf = "$to$target de $_[0]: $text"; + $buf =~ s/\%5E/^/g; + $buf .= "\a\a" if $self->{beep}; + $self->local_send($target eq 'WX' ? 'W' : 'N', $buf); } # send a dx spot sub dx_spot { + my $self = shift; + my $line = shift; + my $isolate = shift; + my ($filter, $hops); + + return unless $self->{dx}; + if ($self->{spotsfilter}) { + ($filter, $hops) = $self->{spotsfilter}->it(@_ ); + return unless $filter; + } + + my $buf = Spot::formatb($self->{user}->wantgrid, $_[0], $_[1], $_[2], $_[3], $_[4]); + $buf .= "\a\a" if $self->{beep}; + $buf =~ s/\%5E/^/g; + $self->local_send('X', $buf); } +sub wwv +{ + my $self = shift; + my $line = shift; + my $isolate = shift; + my ($filter, $hops); + + return unless $self->{wwv}; + + if ($self->{wwvfilter}) { + ($filter, $hops) = $self->{wwvfilter}->it(@_ ); + return unless $filter; + } + + my $buf = "WWV de $_[6] <$_[1]>: SFI=$_[2], A=$_[3], K=$_[4], $_[5]"; + $buf .= "\a\a" if $self->{beep}; + $self->local_send('V', $buf); +} + +sub wcy +{ + my $self = shift; + my $line = shift; + my $isolate = shift; + my ($filter, $hops); + + return unless $self->{wcy}; + + if ($self->{wcyfilter}) { + ($filter, $hops) = $self->{wcyfilter}->it(@_ ); + return unless $filter; + } + + my $buf = "WCY de $_[10] <$_[1]> : K=$_[4] expK=$_[5] A=$_[3] R=$_[6] SFI=$_[2] SA=$_[7] GMF=$_[8] Au=$_[9]"; + $buf .= "\a\a" if $self->{beep}; + $self->local_send('Y', $buf); +} + +# broadcast debug stuff to all interested parties +sub broadcast_debug +{ + my $s = shift; # the line to be rebroadcast + + foreach my $dxchan (DXChannel->get_all) { + next unless $dxchan->{enhanced} && $dxchan->{senddbg}; + $dxchan->send_later('L', $s); + } +} + + 1; __END__ diff --git a/perl/DXCron.pm b/perl/DXCron.pm index c88ad1d3..870c395e 100644 --- a/perl/DXCron.pm +++ b/perl/DXCron.pm @@ -16,9 +16,8 @@ use IO::File; use strict; -use vars qw{@crontab $mtime $lasttime $lastmin}; +use vars qw{@crontab @lcrontab @scrontab $mtime $lasttime $lastmin}; -@crontab = (); $mtime = 0; $lasttime = 0; $lastmin = 0; @@ -33,13 +32,11 @@ sub init if ((-e $localfn && -M $localfn < $mtime) || (-e $fn && -M $fn < $mtime) || $mtime == 0) { my $t; - @crontab = (); - # first read in the standard one if (-e $fn) { $t = -M $fn; - cread($fn); + @scrontab = cread($fn); $mtime = $t if !$mtime || $t <= $mtime; } @@ -47,9 +44,10 @@ sub init if (-e $localfn) { $t = -M $localfn; - cread($localfn); + @lcrontab = cread($localfn); $mtime = $t if $t <= $mtime; } + @crontab = (@scrontab, @lcrontab); } } @@ -59,15 +57,16 @@ sub cread my $fn = shift; my $fh = new IO::File; my $line = 0; + my @out; - dbg('cron', "cron: reading $fn\n"); + dbg("cron: reading $fn\n") if isdbg('cron'); open($fh, $fn) or confess("cron: can't open $fn $!"); while (<$fh>) { $line++; chomp; next if /^\s*#/o or /^\s*$/o; my ($min, $hour, $mday, $month, $wday, $cmd) = /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$/o; - next if !$min; + next unless defined $min; my $ref = bless {}; my $err; @@ -78,13 +77,14 @@ sub cread $err |= parse($ref, 'wday', $wday, 0, 6, "sun", "mon", "tue", "wed", "thu", "fri", "sat"); if (!$err) { $ref->{cmd} = $cmd; - push @crontab, $ref; - dbg('cron', "cron: adding $_\n"); + push @out, $ref; + dbg("cron: adding $_\n") if isdbg('cron'); } else { - dbg('cron', "cron: error on line $line '$_'\n"); + dbg("cron: error on line $line '$_'\n") if isdbg('cron'); } } close($fh); + return @out; } sub parse @@ -147,9 +147,9 @@ sub process (!$cron->{wday} || grep $_ eq $wday, @{$cron->{wday}}) ){ if ($cron->{cmd}) { - dbg('cron', "cron: $min $hour $mday $mon $wday -> doing '$cron->{cmd}'"); + dbg("cron: $min $hour $mday $mon $wday -> doing '$cron->{cmd}'") if isdbg('cron'); eval "$cron->{cmd}"; - dbg('cron', "cron: cmd error $@") if $@; + dbg("cron: cmd error $@") if $@ && isdbg('cron'); } } } @@ -175,32 +175,43 @@ sub connected sub present { my $call = uc shift; - return DXCluster->get_exact($call); + return Route::get($call); } # is it remotely connected anywhere (ignoring SSIDS)? sub presentish { my $call = uc shift; - return DXCluster->get($call); + my $c = Route::get($call); + unless ($c) { + for (1..15) { + $c = Route::get("$call-$_"); + last if $c; + } + } + return $c; } # is it remotely connected anywhere (with exact callsign) and on node? sub present_on { my $call = uc shift; - my $node = uc shift; - my $ref = DXCluster->get_exact($call); - return ($ref && $ref->mynode) ? $ref->mynode->call eq $node : undef; + my $ncall = uc shift; + my $node = Route::Node::get($ncall); + return ($node) ? grep $call eq $_, $node->users : undef; } -# is it remotely connected anywhere (ignoring SSIDS) and on node? +# is it remotely connected (ignoring SSIDS) and on node? sub presentish_on { my $call = uc shift; - my $node = uc shift; - my $ref = DXCluster->get($call); - return ($ref && $ref->mynode) ? $ref->mynode->call eq $node : undef; + my $ncall = uc shift; + my $node = Route::Node::get($ncall); + my $present; + if ($node) { + $present = grep {/^$call/ } $node->users; + } + return $present; } # last time this thing was connected @@ -247,11 +258,11 @@ sub spawn $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT'; alarm(0); } - exec "$line" or dbg('cron', "exec '$line' failed $!"); + exec "$line" or dbg("exec '$line' failed $!") if isdbg('cron'); } - dbg('cron', "spawn of $line started"); + dbg("spawn of $line started") if isdbg('cron'); } else { - dbg('cron', "can't fork for $line $!"); + dbg("can't fork for $line $!") if isdbg('cron'); } # coordinate @@ -265,8 +276,8 @@ sub rcmd my $line = shift; # can we see it? Is it a node? - my $noderef = DXCluster->get_exact($call); - return if !$noderef || !$noderef->pcversion; + my $noderef = Route::Node::get($call); + return unless $noderef && $noderef->version; # send it DXProt::addrcmd($DXProt::me, $call, $line); @@ -276,10 +287,10 @@ sub run_cmd { my $line = shift; my @in = DXCommandmode::run_cmd($DXProt::me, $line); - dbg('cron', "cmd run: $line"); + dbg("cmd run: $line") if isdbg('cron'); for (@in) { s/\s*$//og; - dbg('cron', "cmd out: $_"); + dbg("cmd out: $_") if isdbg('cron'); } } 1; diff --git a/perl/DXDebug.pm b/perl/DXDebug.pm index 766dacbd..14f8dbd2 100644 --- a/perl/DXDebug.pm +++ b/perl/DXDebug.pm @@ -11,10 +11,10 @@ package DXDebug; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(dbginit dbgstore dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck); +@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck); use strict; -use vars qw(%dbglevel $fp); +use vars qw(%dbglevel $fp $callback); use DXUtil; use DXLog (); @@ -22,6 +22,7 @@ use Carp (); %dbglevel = (); $fp = undef; +$callback = undef; # Avoid generating "subroutine redefined" warnings with the following # hack (from CGI::Carp): @@ -29,29 +30,33 @@ if (!defined $DB::VERSION) { local $^W=0; eval qq( sub confess { \$SIG{__DIE__} = 'DEFAULT'; - DXDebug::dbgstore(\$@, Carp::shortmess(\@_)); + DXDebug::dbg(\$@); + DXDebug::dbg(Carp::shortmess(\@_)); exit(-1); } sub croak { \$SIG{__DIE__} = 'DEFAULT'; - DXDebug::dbgstore(\$@, Carp::longmess(\@_)); + DXDebug::dbg(\$@); + DXDebug::dbg(Carp::longmess(\@_)); exit(-1); } - sub carp { DXDebug::dbgstore(Carp::shortmess(\@_)); } - sub cluck { DXDebug::dbgstore(Carp::longmess(\@_)); } + sub carp { DXDebug::dbg(Carp::shortmess(\@_)); } + sub cluck { DXDebug::dbg(Carp::longmess(\@_)); } ); CORE::die(Carp::shortmess($@)) if $@; } else { - eval qq( sub confess { Carp::confess(\@_); }; - sub croak { Carp::croak(\@_); }; - sub cluck { Carp::cluck(\@_); }; + eval qq( sub confess { die Carp::longmess(\@_); }; + sub croak { die Carp::shortmess(\@_); }; + sub cluck { warn Carp::longmess(\@_); }; + sub carp { warn Carp::shortmess(\@_); }; ); } -sub dbgstore +sub dbg($) { + return unless $fp; my $t = time; for (@_) { my $r = $_; @@ -60,17 +65,31 @@ sub dbgstore for (@l) { s/([\x00-\x08\x0B-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg; print "$_\n" if defined \*STDOUT; - $fp->writeunix($t, "$t^$_"); + my $str = "$t^$_"; + &$callback($str) if $callback; + $fp->writeunix($t, $str); } } } sub dbginit { + $callback = shift; + # add sig{__DIE__} handling if (!defined $DB::VERSION) { - $SIG{__WARN__} = sub { dbgstore($@, Carp::shortmess(@_)); }; - $SIG{__DIE__} = sub { dbgstore($@, Carp::longmess(@_)); }; + $SIG{__WARN__} = sub { + if ($_[0] =~ /Deep\s+recursion/i) { + dbg($@); + dbg(Carp::longmess(@_)); + CORE::die; + } else { + dbg($@); + dbg(Carp::shortmess(@_)); + } + }; + + $SIG{__DIE__} = sub { dbg($@); dbg(Carp::longmess(@_)); }; } $fp = DXLog::new('debug', 'dat', 'd'); @@ -83,14 +102,6 @@ sub dbgclose undef $fp; } -sub dbg -{ - my $l = shift; - if ($fp && ($dbglevel{$l} || $l eq 'err')) { - dbgstore(@_); - } -} - sub dbgdump { my $l = shift; @@ -103,7 +114,7 @@ sub dbgdump $c =~ s/[\x00-\x1f\x7f-\xff]/./g; my $left = 16 - length $c; $h .= ' ' x (2 * $left) if $left > 0; - dbgstore($m . sprintf("%4d:", $o) . "$h $c"); + dbg($m . sprintf("%4d:", $o) . "$h $c"); $m = ' ' x (length $m); } } @@ -133,10 +144,10 @@ sub dbglist return keys (%dbglevel); } -sub isdbg +sub isdbg($) { - my $s = shift; - return $dbglevel{$s}; + return unless $fp; + return $dbglevel{$_[0]}; } sub shortmess diff --git a/perl/DXHash.pm b/perl/DXHash.pm index c809dfd3..870ac9cc 100644 --- a/perl/DXHash.pm +++ b/perl/DXHash.pm @@ -30,7 +30,7 @@ sub new my ($pkg, $name) = @_; my $s = readfilestr($main::data, $name); my $self = eval $s if $s; - dbg('err', "error in reading $name in DXHash $@") if $@; + dbg("error in reading $name in DXHash $@") if $@; $self = bless {name => $name}, $pkg unless $self; return $self; } diff --git a/perl/DXLog.pm b/perl/DXLog.pm index 03dc4284..80336e3e 100644 --- a/perl/DXLog.pm +++ b/perl/DXLog.pm @@ -83,11 +83,21 @@ sub open $self->{year} = $year; $self->{thing} = $thing; -# DXDebug::dbg("dxlog", "opening $self->{fn}\n"); +# DXDebug::dbg("opening $self->{fn}\n") if isdbg("dxlog"); return $self->{fh}; } +sub mtime +{ + my ($self, $year, $thing) = @_; + + my $fn = sprintf "$self->{prefix}/$year/%02d", $thing if $self->{'sort'} eq 'm'; + $fn = sprintf "$self->{prefix}/$year/%03d", $thing if $self->{'sort'} eq 'd'; + $fn .= ".$self->{suffix}" if $self->{suffix}; + return (stat $fn)[9]; +} + # open the previous log file in sequence sub openprev { diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 1bbe00ec..2cdb6a80 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -19,7 +19,6 @@ use DXUtil; use DXChannel; use DXUser; use DXM; -use DXCluster; use DXProtVars; use DXProtout; use DXDebug; @@ -169,7 +168,7 @@ sub process if (exists $busy{$fromnode}) { my $ref = $busy{$fromnode}; my $tonode = $ref->{tonode}; - dbg('msg', "Busy, stopping msgno: $ref->{msgno} -> $fromnode"); + dbg("Busy, stopping msgno: $ref->{msgno} -> $fromnode") if isdbg('msg'); $ref->stop_msg($self->call); } @@ -184,7 +183,7 @@ sub process $ref->{linesreq} = $f[10]; $ref->{stream} = $stream; $ref->{count} = 0; # no of lines between PC31s - dbg('msg', "new message from $f[4] to $f[3] '$f[8]' stream $stream\n"); + dbg("new message from $f[4] to $f[3] '$f[8]' stream $fromnode/$stream\n") if isdbg('msg'); Log('msg', "Incoming message $f[4] to $f[3] '$f[8]'" ); $work{"$fromnode$stream"} = $ref; # store in work $busy{$fromnode} = $ref; # set interlock @@ -195,7 +194,7 @@ sub process my $uref = DXUser->get_current($ref->{to}); if (is_callsign($ref->{to}) && !$ref->{private} && $uref && $uref->homenode) { $ref->{private} = 1; - dbg('msg', "set bull to $ref->{to} to private"); + dbg("set bull to $ref->{to} to private") if isdbg('msg'); } last SWITCH; } @@ -208,12 +207,12 @@ sub process $ref->{count}++; if ($ref->{count} >= $ref->{linesreq}) { $self->send(DXProt::pc31($f[2], $f[1], $f[3])); - dbg('msg', "stream $f[3]: $ref->{count} lines received\n"); + dbg("stream $f[3]: $ref->{count} lines received\n") if isdbg('msg'); $ref->{count} = 0; } $ref->{lastt} = $main::systime; } else { - dbg('msg', "PC29 from unknown stream $f[3] from $f[2]" ); + dbg("PC29 from unknown stream $f[3] from $f[2]") if isdbg('msg'); $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream } last SWITCH; @@ -227,13 +226,13 @@ sub process $ref->{count} = 0; $ref->{linesreq} = 5; $work{"$f[2]$f[3]"} = $ref; # new ref - dbg('msg', "incoming subject ack stream $f[3]\n"); + dbg("incoming subject ack stream $f[3]\n") if isdbg('msg'); $busy{$f[2]} = $ref; # interlock push @{$ref->{lines}}, ($ref->read_msg_body); $ref->send_tranche($self); $ref->{lastt} = $main::systime; } else { - dbg('msg', "PC30 from unknown stream $f[3] from $f[2]" ); + dbg("PC30 from unknown stream $f[3] from $f[2]") if isdbg('msg'); $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream } last SWITCH; @@ -242,18 +241,18 @@ sub process if ($pcno == 31) { # acknowledge a tranche of lines my $ref = $work{"$f[2]$f[3]"}; if ($ref) { - dbg('msg', "tranche ack stream $f[3]\n"); + dbg("tranche ack stream $f[3]\n") if isdbg('msg'); $ref->send_tranche($self); $ref->{lastt} = $main::systime; } else { - dbg('msg', "PC31 from unknown stream $f[3] from $f[2]" ); + dbg("PC31 from unknown stream $f[3] from $f[2]") if isdbg('msg'); $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream } last SWITCH; } if ($pcno == 32) { # incoming EOM - dbg('msg', "stream $f[3]: EOM received\n"); + dbg("stream $f[3]: EOM received\n") if isdbg('msg'); my $ref = $work{"$f[2]$f[3]"}; if ($ref) { $self->send(DXProt::pc33($f[2], $f[1], $f[3])); # acknowledge it @@ -274,7 +273,7 @@ sub process if ($ref->{subject} eq $m->{subject} && $ref->{t} == $m->{t} && $ref->{from} eq $m->{from} && $ref->{to} eq $m->{to}) { $ref->stop_msg($self->call); my $msgno = $m->{msgno}; - dbg('msg', "duplicate message from $ref->{from} -> $ref->{to} to $msgno"); + dbg("duplicate message from $ref->{from} -> $ref->{to} to $msgno") if isdbg('msg'); Log('msg', "duplicate message from $ref->{from} -> $ref->{to} to $msgno"); return; } @@ -286,7 +285,7 @@ sub process # look for 'bad' to addresses if ($ref->dump_it) { $ref->stop_msg($self->call); - dbg('msg', "'Bad' message $ref->{to}"); + dbg("'Bad' message $ref->{to}") if isdbg('msg'); Log('msg', "'Bad' message $ref->{to}"); return; } @@ -302,7 +301,7 @@ sub process } $ref->stop_msg($self->call); } else { - dbg('msg', "PC32 from unknown stream $f[3] from $f[2]" ); + dbg("PC32 from unknown stream $f[3] from $f[2]") if isdbg('msg'); $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream } # queue_msg(0); @@ -322,7 +321,7 @@ sub process } $ref->stop_msg($self->call); } else { - dbg('msg', "PC33 from unknown stream $f[3] from $f[2]" ); + dbg("PC33 from unknown stream $f[3] from $f[2]") if isdbg('msg'); $self->send(DXProt::pc42($f[2], $f[1], $f[3])); # unknown stream } @@ -336,7 +335,7 @@ sub process $f[3] =~ s/\.//og; # remove dots $f[3] =~ s/^\///o; # remove the leading / $f[3] = lc $f[3]; # to lower case; - dbg('msg', "incoming file $f[3]\n"); + dbg("incoming file $f[3]\n") if isdbg('msg'); $f[3] = 'packclus/' . $f[3] unless $f[3] =~ /^packclus\//o; # create any directories @@ -348,7 +347,7 @@ sub process $fn .= "/$part"; next if -e $fn; last SWITCH if !mkdir $fn, 0777; - dbg('msg', "created directory $fn\n"); + dbg("created directory $fn\n") if isdbg('msg'); } my $stream = next_transno($f[2]); my $ref = DXMsg->alloc($stream, "$main::root/$f[3]", $self->call, time, !$f[4], $f[3], ' ', '0', '0'); @@ -368,7 +367,7 @@ sub process } if ($pcno == 42) { # abort transfer - dbg('msg', "stream $f[3]: abort received\n"); + dbg("stream $f[3]: abort received\n") if isdbg('msg'); my $ref = $work{"$f[2]$f[3]"}; if ($ref) { $ref->stop_msg($self->call); @@ -399,7 +398,7 @@ sub store my $lines = shift; if ($ref->{file}) { # a file - dbg('msg', "To be stored in $ref->{to}\n"); + dbg("To be stored in $ref->{to}\n") if isdbg('msg'); my $fh = new IO::File "$ref->{to}", "w"; if (defined $fh) { @@ -408,7 +407,7 @@ sub store print $fh "$line\n"; } $fh->close; - dbg('msg', "file $ref->{to} stored\n"); + dbg("file $ref->{to} stored\n") if isdbg('msg'); Log('msg', "file $ref->{to} from $ref->{from} stored" ); } else { confess "can't open file $ref->{to} $!"; @@ -418,7 +417,7 @@ sub store # attempt to open the message file my $fn = filename($ref->{msgno}); - dbg('msg', "To be stored in $fn\n"); + dbg("To be stored in $fn\n") if isdbg('msg'); # now save the file, overwriting what's there, YES I KNOW OK! (I will change it if it's a problem) my $fh = new IO::File "$fn", "w"; @@ -434,7 +433,7 @@ sub store print $fh "$line\n"; } $fh->close; - dbg('msg', "msg $ref->{msgno} stored\n"); + dbg("msg $ref->{msgno} stored\n") if isdbg('msg'); Log('msg', "msg $ref->{msgno} from $ref->{from} to $ref->{to} stored" ); } else { confess "can't open msg file $fn $!"; @@ -448,13 +447,13 @@ sub del_msg my $self = shift; # remove it from the active message list - dbg('msg', "\@msg = " . scalar @msg . " before delete"); + dbg("\@msg = " . scalar @msg . " before delete") if isdbg('msg'); @msg = grep { $_ != $self } @msg; # remove the file unlink filename($self->{msgno}); - dbg('msg', "deleting $self->{msgno}\n"); - dbg('msg', "\@msg = " . scalar @msg . " after delete"); + dbg("deleting $self->{msgno}\n") if isdbg('msg'); + dbg("\@msg = " . scalar @msg . " after delete") if isdbg('msg'); } # clean out old messages from the message queue @@ -463,18 +462,18 @@ sub clean_old my $ref; # mark old messages for deletion - dbg('msg', "\@msg = " . scalar @msg . " before delete"); + dbg("\@msg = " . scalar @msg . " before delete") if isdbg('msg'); foreach $ref (@msg) { if (ref($ref) && !$ref->{keep} && $ref->{t} < $main::systime - $maxage) { $ref->{deleteme} = 1; unlink filename($ref->{msgno}); - dbg('msg', "deleting old $ref->{msgno}\n"); + dbg("deleting old $ref->{msgno}\n") if isdbg('msg'); } } # remove them all from the active message list @msg = grep { !$_->{deleteme} } @msg; - dbg('msg', "\@msg = " . scalar @msg . " after delete"); + dbg("\@msg = " . scalar @msg . " after delete") if isdbg('msg'); $last_clean = $main::systime; } @@ -490,21 +489,21 @@ sub read_msg_header $file = new IO::File "$fn"; if (!$file) { - dbg('err', "Error reading $fn $!"); + dbg("Error reading $fn $!"); Log('err', "Error reading $fn $!"); return undef; } $size = -s $fn; $line = <$file>; # first line if ($size == 0 || !$line) { - dbg('err', "Empty $fn $!"); + dbg("Empty $fn $!"); Log('err', "Empty $fn $!"); return undef; } chomp $line; $size -= length $line; if (! $line =~ /^===/o) { - dbg('err', "corrupt first line in $fn ($line)"); + dbg("corrupt first line in $fn ($line)"); Log('err', "corrupt first line in $fn ($line)"); return undef; } @@ -516,7 +515,7 @@ sub read_msg_header chomp $line; $size -= length $line; if (! $line =~ /^===/o) { - dbg('err', "corrupt second line in $fn ($line)"); + dbg("corrupt second line in $fn ($line)"); Log('err', "corrupt second line in $fn ($line)"); return undef; } @@ -543,7 +542,7 @@ sub read_msg_body $file = new IO::File; if (!open($file, $fn)) { - dbg('err' ,"Error reading $fn $!"); + dbg("Error reading $fn $!"); Log('err' ,"Error reading $fn $!"); return undef; } @@ -587,7 +586,7 @@ sub queue_msg # bat down the message list looking for one that needs to go off site and whose # nearest node is not busy. - dbg('msg', "queue msg ($sort)\n"); + dbg("queue msg ($sort)\n") if isdbg('msg'); my @nodelist = DXChannel::get_all_nodes; foreach $ref (@msg) { @@ -600,7 +599,7 @@ sub queue_msg # any time outs? if (exists $ref->{lastt} && $main::systime >= $ref->{lastt} + $timeout) { my $node = $ref->{tonode}; - dbg('msg', "Timeout, stopping msgno: $ref->{msgno} -> $node"); + dbg("Timeout, stopping msgno: $ref->{msgno} -> $node") if isdbg('msg'); Log('msg', "Timeout, stopping msgno: $ref->{msgno} -> $node"); $ref->stop_msg($node); @@ -617,16 +616,22 @@ sub queue_msg my $dxchan; if ($ref->{private}) { next if $ref->{'read'}; # if it is read, it is stuck here - $clref = DXCluster->get_exact($ref->{to}); - unless ($clref) { # otherwise look for a homenode - my $uref = DXUser->get_current($ref->{to}); - my $hnode = $uref->homenode if $uref; - $clref = DXCluster->get_exact($hnode) if $hnode; - } - if ($clref && !grep { $clref->dxchan == $_ } DXCommandmode::get_all()) { - next if $clref->call eq $main::mycall; # i.e. it lives here + $clref = Route::get($ref->{to}); +# unless ($clref) { # otherwise look for a homenode +# my $uref = DXUser->get_current($ref->{to}); +# my $hnode = $uref->homenode if $uref; +# $clref = Route::Node::get($hnode) if $hnode; +# } + if ($clref) { $dxchan = $clref->dxchan; - $ref->start_msg($dxchan) if $dxchan && !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + if ($dxchan) { + if ($dxchan->is_node) { + next if $clref->call eq $main::mycall; # i.e. it lives here + $ref->start_msg($dxchan) if !get_busy($dxchan->call) && $dxchan->state eq 'normal'; + } + } else { + dbg("Route: No dxchan for $ref->{to} " . ref($clref) ) if isdbg('msg'); + } } } @@ -672,7 +677,7 @@ sub start_msg { my ($self, $dxchan) = @_; - dbg('msg', "start msg $self->{msgno}\n"); + dbg("start msg $self->{msgno}\n") if isdbg('msg'); $self->{linesreq} = 10; $self->{count} = 0; $self->{tonode} = $dxchan->call; @@ -710,7 +715,7 @@ sub stop_msg my $stream = $self->{stream} if exists $self->{stream}; - dbg('msg', "stop msg $self->{msgno} -> node $node\n"); + dbg("stop msg $self->{msgno} -> node $node\n") if isdbg('msg'); delete $work{$node}; delete $work{"$node$stream"} if $stream; $self->workclean; @@ -728,12 +733,12 @@ sub next_transno my $fh = new IO::File; if (sysopen($fh, $fn, O_RDWR|O_CREAT, 0666)) { $fh->autoflush(1); - $msgno = $fh->getline; + $msgno = $fh->getline || '0'; chomp $msgno; $msgno++; seek $fh, 0, 0; $fh->print("$msgno\n"); - dbg('msg', "msgno $msgno allocated for $name\n"); + dbg("msgno $msgno allocated for $name\n") if isdbg('msg'); $fh->close; } else { confess "can't open $fn $!"; @@ -749,9 +754,9 @@ sub init my $ref; # load various control files - dbg('err', "load badmsg: " . (load_badmsg() or "Ok")); - dbg('err', "load forward: " . (load_forward() or "Ok")); - dbg('err', "load swop: " . (load_swop() or "Ok")); + dbg("load badmsg: " . (load_badmsg() or "Ok")); + dbg("load forward: " . (load_forward() or "Ok")); + dbg("load swop: " . (load_swop() or "Ok")); # read in the directory opendir($dir, $msgdir) or confess "can't open $msgdir $!"; @@ -764,7 +769,7 @@ sub init $ref = read_msg_header("$msgdir/$_"); unless ($ref) { - dbg('err', "Deleting $_"); + dbg("Deleting $_"); Log('err', "Deleting $_"); unlink "$msgdir/$_"; next; @@ -772,7 +777,7 @@ sub init # delete any messages to 'badmsg.pl' places if ($ref->dump_it) { - dbg('msg', "'Bad' TO address $ref->{to}"); + dbg("'Bad' TO address $ref->{to}") if isdbg('msg'); Log('msg', "'Bad' TO address $ref->{to}"); $ref->del_msg; next; @@ -1064,7 +1069,7 @@ sub import_msgs # are there any to do in this directory? return unless -d $importfn; unless (opendir(DIR, $importfn)) { - dbg('msg', "can\'t open $importfn $!"); + dbg("can\'t open $importfn $!") if isdbg('msg'); Log('msg', "can\'t open $importfn $!"); return; } @@ -1078,7 +1083,7 @@ sub import_msgs my $fn = "$importfn/$name"; next unless -f $fn; unless (open(MSG, $fn)) { - dbg('msg', "can\'t open import file $fn $!"); + dbg("can\'t open import file $fn $!") if isdbg('msg'); Log('msg', "can\'t open import file $fn $!"); unlink($fn); next; @@ -1111,7 +1116,7 @@ sub import_one my @f = split /\s+/, $line; unless (@f && $f[0] =~ /^(:?S|SP|SB|SEND)$/ ) { my $m = "invalid first line in import '$line'"; - dbg('MSG', $m ); + dbg($m) if isdbg('msg'); return (1, $m); } while (@f) { diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 0fce7f25..966f0eef 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -15,7 +15,6 @@ use DXUtil; use DXChannel; use DXUser; use DXM; -use DXCluster; use DXProtVars; use DXCommandmode; use DXLog; @@ -36,7 +35,7 @@ use Route::Node; use strict; use vars qw($me $pc11_max_age $pc23_max_age - $last_hour %pings %rcmds + $last_hour $last10 %eph %pings %rcmds %nodehops $baddx $badspotter $badnode $censorpc $allowzero $decode_dk0wcy $send_opernam @checklist); @@ -53,6 +52,7 @@ $censorpc = 1; # Do a BadWords::check on text fields and reject things $baddx = new DXHash "baddx"; $badspotter = new DXHash "badspotter"; $badnode = new DXHash "badnode"; +$last10 = time; @checklist = ( @@ -192,6 +192,12 @@ sub init sub new { my $self = DXChannel::alloc(@_); + + # add this node to the table, the values get filled in later + my $pkg = shift; + my $call = shift; + $main::routeroot->add($call, '0000', Route::here(1)) if $call ne $main::mycall; + return $self; } @@ -218,6 +224,7 @@ sub start $self->{wwvfilter} = Filter::read_in('wwv', $call, 0) || Filter::read_in('wwv', 'node_default', 0); $self->{wcyfilter} = Filter::read_in('wcy', $call, 0) || Filter::read_in('wcy', 'node_default', 0); $self->{annfilter} = Filter::read_in('ann', $call, 0) || Filter::read_in('ann', 'node_default', 0) ; + $self->{routefilter} = Filter::read_in('route', $call, 0) || Filter::read_in('route', 'node_default', 0) ; # get the INPUT filters (these only pertain to Clusters) @@ -225,6 +232,7 @@ sub start $self->{inwwvfilter} = Filter::read_in('wwv', $call, 1) || Filter::read_in('wwv', 'node_default', 1); $self->{inwcyfilter} = Filter::read_in('wcy', $call, 1) || Filter::read_in('wcy', 'node_default', 1); $self->{inannfilter} = Filter::read_in('ann', $call, 1) || Filter::read_in('ann', 'node_default', 1); + $self->{inroutefilter} = Filter::read_in('route', $call, 1) || Filter::read_in('route', 'node_default', 1); # set unbuffered and no echo $self->send_now('B',"0"); @@ -251,7 +259,6 @@ sub start # send info to all logged in thingies $self->tell_login('loginn'); - $main::routeroot->add($call); Log('DXProt', "$call connected"); } @@ -268,10 +275,8 @@ sub normal # print join(',', @field), "\n"; - # ignore any lines that don't start with PC - return if !$field[0] =~ /^PC/; - # process PC frames + # process PC frames, this will fail unless the frame starts PCnn my ($pcno) = $field[0] =~ /^PC(\d\d)/; # just get the number return unless $pcno; return if $pcno < 10 || $pcno > 99; @@ -279,7 +284,7 @@ sub normal # check for and dump bad protocol messages my $n = check($pcno, @field); if ($n) { - dbg('chan', "PCPROT: bad field $n, dumped (" . parray($checklist[$pcno-10]) . ")"); + dbg("PCPROT: bad field $n, dumped (" . parray($checklist[$pcno-10]) . ")") if isdbg('chanerr'); return; } @@ -288,7 +293,7 @@ sub normal eval { $pcr = Local::pcprot($self, $pcno, @field); }; -# dbg('local', "Local::pcprot error $@") if $@; +# dbg("Local::pcprot error $@") if isdbg('local') if $@; return if $pcr; SWITCH: { @@ -298,7 +303,7 @@ sub normal if ($censorpc) { my @bad; if (@bad = BadWords::check($field[3])) { - dbg('chan', "PCPROT: Bad words: @bad, dropped" ); + dbg("PCPROT: Bad words: @bad, dropped") if isdbg('chanerr'); return; } } @@ -311,7 +316,8 @@ sub normal } else { $call = $to = $field[2]; } - $dxchan = DXChannel->get($call); + $dxchan = DXChannel->get($main::myalias) if $call eq $main::mycall; + $dxchan = DXChannel->get($call) unless $dxchan; if ($dxchan && $dxchan->is_user) { $field[3] =~ s/\%5E/^/g; $dxchan->talk($field[1], $to, $via, $field[3]); @@ -333,13 +339,13 @@ sub normal # if this is a 'nodx' node then ignore it if ($badnode->in($field[7])) { - dbg('chan', "PCPROT: Bad Node, dropped"); + dbg("PCPROT: Bad Node, dropped") if isdbg('chanerr'); return; } # if this is a 'bad spotter' user then ignore it if ($badspotter->in($field[6])) { - dbg('chan', "PCPROT: Bad Spotter, dropped"); + dbg("PCPROT: Bad Spotter, dropped") if isdbg('chanerr'); return; } @@ -347,13 +353,13 @@ sub normal my $d = cltounix($field[3], $field[4]); # bang out (and don't pass on) if date is invalid or the spot is too old (or too young) if (!$d || ($pcno == 11 && ($d < $main::systime - $pc11_max_age || $d > $main::systime + 900))) { - dbg('chan', "PCPROT: Spot ignored, invalid date or out of range ($field[3] $field[4])\n"); + dbg("PCPROT: Spot ignored, invalid date or out of range ($field[3] $field[4])\n") if isdbg('chanerr'); return; } # is it 'baddx' if ($baddx->in($field[2])) { - dbg('chan', "PCPROT: Bad DX spot, ignored"); + dbg("PCPROT: Bad DX spot, ignored") if isdbg('chanerr'); return; } @@ -361,17 +367,17 @@ sub normal $field[5] =~ s/^\s+//; # take any leading blanks off $field[2] = unpad($field[2]); # take off leading and trailing blanks from spotted callsign if ($field[2] =~ /BUST\w*$/) { - dbg('chan', "PCPROT: useless 'BUSTED' spot"); + dbg("PCPROT: useless 'BUSTED' spot") if isdbg('chanerr'); return; } if (Spot::dup($field[1], $field[2], $d, $field[5])) { - dbg('chan', "PCPROT: Duplicate Spot ignored\n"); + dbg("PCPROT: Duplicate Spot ignored\n") if isdbg('chanerr'); return; } if ($censorpc) { my @bad; if (@bad = BadWords::check($field[5])) { - dbg('chan', "PCPROT: Bad words: @bad, dropped" ); + dbg("PCPROT: Bad words: @bad, dropped") if isdbg('chanerr'); return; } } @@ -381,7 +387,7 @@ sub normal if ($self->{inspotsfilter}) { my ($filter, $hops) = $self->{inspotsfilter}->it(@spot); unless ($filter) { - dbg('chan', "PCPROT: Rejected by filter"); + dbg("PCPROT: Rejected by input spot filter") if isdbg('chanerr'); return; } } @@ -416,21 +422,25 @@ sub normal my $node; my $to = $user->homenode; my $last = $user->lastoper || 0; - if ($send_opernam && $main::systime > $last + $DXUser::lastoperinterval && $to && ($node = DXCluster->get_exact($to)) ) { + if ($to ne $main::mycall && $send_opernam && $main::systime > $last + $DXUser::lastoperinterval && $to && ($node = Route::Node::get($to)) ) { my $cmd = "forward/opernam $spot[4]"; # send the rcmd but we aren't interested in the replies... - if ($node && $node->dxchan && $node->dxchan->is_clx) { + my $dxchan = $node->dxchan; + if ($dxchan && $dxchan->is_clx) { route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd)); } else { route(undef, $to, pc34($main::mycall, $to, $cmd)); } if ($to ne $field[7]) { $to = $field[7]; - $node = DXCluster->get_exact($to); - if ($node && $node->dxchan && $node->dxchan->is_clx) { - route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd)); - } else { - route(undef, $to, pc34($main::mycall, $to, $cmd)); + $node = Route::Node::get($to); + if ($node) { + $dxchan = $node->dxchan; + if ($dxchan && $dxchan->is_clx) { + route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd)); + } else { + route(undef, $to, pc34($main::mycall, $to, $cmd)); + } } } $user->lastoper($main::systime); @@ -444,7 +454,7 @@ sub normal eval { $r = Local::spot($self, @spot); }; -# dbg('local', "Local::spot1 error $@") if $@; +# dbg("Local::spot1 error $@") if isdbg('local') if $@; return if $r; # DON'T be silly and send on PC26s! @@ -459,14 +469,14 @@ sub normal # announce duplicate checking $field[3] =~ s/^\s+//; # remove leading blanks if (AnnTalk::dup($field[1], $field[2], $field[3])) { - dbg('chan', "PCPROT: Duplicate Announce ignored"); + dbg("PCPROT: Duplicate Announce ignored") if isdbg('chanerr'); return; } if ($censorpc) { my @bad; if (@bad = BadWords::check($field[3])) { - dbg('chan', "PCPROT: Bad words: @bad, dropped" ); + dbg("PCPROT: Bad words: @bad, dropped") if isdbg('chanerr'); return; } } @@ -491,7 +501,7 @@ sub normal my ($filter, $hops) = $self->{inannfilter}->it(@field[1..6], $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq); unless ($filter) { - dbg('chan', "PCPROT: Rejected by filter"); + dbg("PCPROT: Rejected by input announce filter") if isdbg('chanerr'); return; } } @@ -519,146 +529,101 @@ sub normal # general checks my $dxchan; - if ($field[1] eq $main::mycall || $field[2] eq $main::mycall) { - dbg('chan', "PCPROT: trying to alter config on this node from outside!"); - return; - } - if ($field[2] eq $main::myalias && DXChannel->get($field[1])) { - dbg('chan', "PCPROT: trying to connect sysop from outside!"); - return; - } - if (($dxchan = DXChannel->get($field[1])) && $dxchan != $self) { - dbg('chan', "PCPROT: $field[1] connected locally"); + my $ncall = $field[1]; + my $newline = "PC16^"; + + if ($ncall eq $main::mycall) { + dbg("PCPROT: trying to alter config on this node from outside!") if isdbg('chanerr'); return; } - - my $node = DXCluster->get_exact($field[1]); - unless ($node) { - dbg('chan', "PCPROT: Node $field[1] not in config"); + $dxchan = DXChannel->get($ncall); + if ($dxchan && $dxchan ne $self) { + dbg("PCPROT: PC16 from $self->{call} trying to alter locally connected $ncall, ignored!") if isdbg('chanerr'); return; } - my $pref = Route::Node::get($field[1]); - unless ($pref) { - dbg('chan', "PCPROT: Route::Node $field[1] not in config"); + my $parent = Route::Node::get($ncall); + unless ($parent) { + dbg("PCPROT: Node $ncall not in config") if isdbg('chanerr'); return; } - my $wrong; - unless ($node->isa('DXNode')) { - dbg('chan', "PCPROT: $field[1] is not a node"); - $wrong = 1; - } - if ($node->dxchan != $self) { - dbg('chan', "PCPROT: $field[1] came in on wrong channel"); - $wrong = 1; - } + + # input filter if required + return unless $self->in_filter_route($parent); + my $i; my @rout; for ($i = 2; $i < $#field; $i++) { - my ($call, $confmode, $here) = $field[$i] =~ /^(\S+) (\S) (\d)/o; - next unless $call && $confmode && defined $here && is_callsign($call); - $confmode = $confmode eq '*'; + my ($call, $conf, $here) = $field[$i] =~ /^(\S+) (\S) (\d)/o; + next unless $call && $conf && defined $here && is_callsign($call); + next if $call eq $main::mycall; + + $conf = $conf eq '*'; - push @rout, $pref->add_user($call, Route::here($here)|Route::conf($confmode)); + my $r = Route::User::get($call); + my $flags = Route::here($here)|Route::conf($conf); - unless ($wrong) { - my $ref = DXCluster->get_exact($call); - if ($ref) { - if ($ref->isa('DXNode')) { - dbg('chan', "PCPROT: $call is a node"); - next; - } - my $rcall = $ref->mynode->call; - dbg('chan', "PCPROT: already have $call on $rcall"); - next; + if ($r) { + if ($r->flags != $flags) { + $r->flags($flags); + push @rout, $r; } - - DXNodeuser->new($self, $node, $call, $confmode, $here); - - # add this station to the user database, if required - $call =~ s/-\d+$//o; # remove ssid for users - my $user = DXUser->get_current($call); - $user = DXUser->new($call) if !$user; - $user->homenode($node->call) if !$user->homenode; - $user->node($node->call); - $user->lastin($main::systime) unless DXChannel->get($call); - $user->put; + $r->addparent($ncall); + } else { + push @rout, $parent->add_user($call, $flags); } + + # add this station to the user database, if required + $call =~ s/-\d+$//o; # remove ssid for users + my $user = DXUser->get_current($call); + $user = DXUser->new($call) if !$user; + $user->homenode($parent->call) if !$user->homenode; + $user->node($parent->call); + $user->lastin($main::systime) unless DXChannel->get($call); + $user->put; } - dbg('route', "B/C PC16 on $field[1] for: " . join(',', map{$_->call} @rout)) if @rout; - - # all these 'wrong' is just while we are swopping over to the Route stuff - return if $wrong; # queue up any messages (look for privates only) DXMsg::queue_msg(1) if $self->state eq 'normal'; -# broadcast_route($line, $self, $field[1]); -# return; - last SWITCH; + + $self->route_pc16($parent, @rout) if @rout; + return; } if ($pcno == 17) { # remove a user my $dxchan; - if ($field[1] eq $main::mycall || $field[2] eq $main::mycall) { - dbg('chan', "PCPROT: trying to alter config on this node from outside!"); + my $ncall = $field[2]; + my $ucall = $field[1]; + if ($ncall eq $main::mycall) { + dbg("PCPROT: trying to alter config on this node from outside!") if isdbg('chanerr'); return; } - if ($field[1] eq $main::myalias && DXChannel->get($field[1])) { - dbg('chan', "PCPROT: trying to disconnect sysop from outside!"); + $dxchan = DXChannel->get($ncall); + if ($dxchan && $dxchan ne $self) { + dbg("PCPROT: PC17 from $self->{call} trying to alter locally connected $ncall, ignored!") if isdbg('chanerr'); return; } - if ($dxchan = DXChannel->get($field[1])) { - dbg('chan', "PCPROT: $field[1] connected locally"); + my $parent = Route::Node::get($ncall); + unless ($parent) { + dbg("PCPROT: Route::Node $ncall not in config") if isdbg('chanerr'); return; } - my $pref = Route::Node::get($field[2]); - unless ($pref) { - dbg('chan', "PCPROT: Route::Node $field[2] not in config"); - return; - } - $pref->del_user($field[1]); - dbg('route', "B/C PC17 on $field[2] for: $field[1]"); - - my $node = DXCluster->get_exact($field[2]); - unless ($node) { - dbg('chan', "PCPROT: Node $field[2] not in config"); - return; - } - unless ($node->isa('DXNode')) { - dbg('chan', "PCPROT: $field[2] is not a node"); - return; - } - if ($node->dxchan != $self) { - dbg('chan', "PCPROT: $field[2] came in on wrong channel"); - return; - } - my $ref = DXCluster->get_exact($field[1]); - if ($ref) { - if ($ref->mynode != $node) { - dbg('chan', "PCPROT: $field[1] came in from wrong node $field[2]"); - return; - } - $ref->del; - } else { - dbg('chan', "PCPROT: $field[1] not known" ); - return; - } -# broadcast_route($line, $self, $field[2]); -# return; - last SWITCH; + # input filter if required + return unless $self->in_filter_route($parent); + + my @rout = $parent->del_user($ucall); + $self->route_pc17($parent, @rout) if @rout; + return; } if ($pcno == 18) { # link request $self->state('init'); # first clear out any nodes on this dxchannel - my @gonenodes = map { $_->dxchan == $self ? $_ : () } DXNode::get_all(); - foreach my $node (@gonenodes) { - next if $node->dxchan == $DXProt::me; - broadcast_ak1a(pc21($node->call, 'Gone, re-init') , $self) unless $self->{isolate}; - $node->del(); - } + my $parent = Route::Node::get($self->{call}); + my @rout = $parent->del_nodes; + $self->route_pc21(@rout, $parent); $self->send_local_config(); $self->send(pc20()); return; # we don't pass these on @@ -670,60 +635,59 @@ sub normal # new routing list my @rout; - my $pref = Route::Node::get($self->{call}); + my $parent = Route::Node::get($self->{call}); + unless ($parent) { + dbg("DXPROT: my parent $self->{call} has disappeared"); + $self->disconnect; + return; + } # parse the PC19 for ($i = 1; $i < $#field-1; $i += 4) { my $here = $field[$i]; my $call = uc $field[$i+1]; - my $confmode = $field[$i+2]; + my $conf = $field[$i+2]; my $ver = $field[$i+3]; - next unless defined $here && defined $confmode && is_callsign($call); + next unless defined $here && defined $conf && is_callsign($call); # check for sane parameters $ver = 5000 if $ver eq '0000'; next if $ver < 5000; # only works with version 5 software next if length $call < 3; # min 3 letter callsigns - - - # now check the call over - my $node = DXCluster->get_exact($call); - if ($node) { - my $dxchan; - if ((my $dxchan = DXChannel->get($call)) && $dxchan != $self) { - dbg('chan', "PCPROT: $call connected locally"); + next if $call eq $main::mycall; + + # update it if required + my $r = Route::Node::get($call); + my $flags = Route::here($here)|Route::conf($conf); + if ($r) { + my $ar; + if ($call ne $parent->call) { + if ($self->in_filter_route($r)) { + $ar = $parent->add($call, $ver, $flags); + push @rout, $ar if $ar; + } else { + next; + } } - if ($node->dxchan != $self) { - dbg('chan', "PCPROT: $call come in on wrong channel"); - next; + if ($r->version ne $ver || $r->flags != $flags) { + $r->version($ver); + $r->flags($flags); + push @rout, $r unless $ar; } - - # add a route object - if ($call eq $pref->call && !$pref->version) { - $pref->version($ver); - $pref->flags(Route::here($here)|Route::conf($confmode)); + } else { + if ($call eq $self->{call}) { + dbg("DXPROT: my channel route for $call has disappeared"); + next; + }; + + my $new = Route->new($call); # throw away + if ($self->in_filter_route($new)) { + my $r = $parent->add($call, $ver, $flags); + push @rout, $r; } else { - my $r = $pref->add($call, $ver, Route::here($here)|Route::conf($confmode)); - push @rout, $r if $r; + next; } - - my $rcall = $node->mynode->call; - dbg('chan', "PCPROT: already have $call on $rcall"); - next; - } - - # add a route object - if ($call eq $pref->call && !$pref->version) { - $pref->version($ver); - $pref->flags(Route::here($here)|Route::conf($confmode)); - } else { - my $r = $pref->add($call, $ver, Route::here($here)|Route::conf($confmode)); - push @rout, $r if $r; } - # add it to the nodes table and outgoing line - $newline .= "$here^$call^$confmode^$ver^"; - DXNode->new($self, $call, $confmode, $here, $ver); - # unbusy and stop and outgoing mail (ie if somehow we receive another PC19 without a disconnect) my $mref = DXMsg::get_busy($call); $mref->stop_msg($call) if $mref; @@ -742,14 +706,8 @@ sub normal $user->put; } - dbg('route', "B/C PC19 for: " . join(',', map{$_->call} @rout)) if @rout; - - return if $newline eq "PC19^"; - - # add hop count - $newline .= get_hops(19) . "^"; - $line = $newline; - last SWITCH; + $self->route_pc19(@rout) if @rout; + return; } if ($pcno == 20) { # send local configuration @@ -762,49 +720,32 @@ sub normal if ($pcno == 21) { # delete a cluster from the list my $call = uc $field[1]; my @rout; - my $pref = Route::Node::get($call); - + my $parent = Route::Node::get($self->{call}); + unless ($parent) { + dbg("DXPROT: my parent $self->{call} has disappeared"); + $self->disconnect; + return; + } + my $node = Route::Node::get($call); if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me! if ($call eq $self->{call}) { - dbg('chan', "PCPROT: Trying to disconnect myself with PC21"); - return; - } - if (my $dxchan = DXChannel->get($call)) { - dbg('chan', "PCPROT: $call connected locally"); + dbg("PCPROT: Trying to disconnect myself with PC21") if isdbg('chanerr'); return; } - # routing objects - if ($pref) { - push @rout, $pref->del_node($call); - } else { - dbg('chan', "PCPROT: Route::Node $call not in config"); - } - - my $node = DXCluster->get_exact($call); if ($node) { - unless ($node->isa('DXNode')) { - dbg('chan', "PCPROT: $call is not a node"); - return; - } - if ($node->dxchan != $self) { - dbg('chan', "PCPROT: $call come in on wrong channel"); - return; - } - $node->del(); - } else { - dbg('chan', "PCPROT: $call not in table, dropped"); - return; + # input filter it + return unless $self->in_filter_route($node); + + # routing objects + push @rout, $node->del($parent); } } else { - dbg('chan', "PCPROT: I WILL _NOT_ be disconnected!"); + dbg("PCPROT: I WILL _NOT_ be disconnected!") if isdbg('chanerr'); return; } - dbg('route', "B/C PC21 for: " . join(',', (map{$_->call} @rout))) if @rout; - -# broadcast_route($line, $self, $call); -# return; - last SWITCH; + $self->route_pc21(@rout) if @rout; + return; } if ($pcno == 22) { @@ -830,11 +771,11 @@ sub normal my ($r) = $field[6] =~ /R=(\d+)/; $r = 0 unless $r; if (($pcno == 23 && $d < $main::systime - $pc23_max_age) || $d > $main::systime + 1500 || $field[2] < 0 || $field[2] > 23) { - dbg('chan', "PCPROT: WWV Date ($field[1] $field[2]) out of range"); + dbg("PCPROT: WWV Date ($field[1] $field[2]) out of range") if isdbg('chanerr'); return; } if (Geomag::dup($d,$sfi,$k,$i,$field[6])) { - dbg('chan', "PCPROT: Dup WWV Spot ignored\n"); + dbg("PCPROT: Dup WWV Spot ignored\n") if isdbg('chanerr'); return; } $field[7] =~ s/-\d+$//o; # remove spotter's ssid @@ -845,7 +786,7 @@ sub normal eval { $rep = Local::wwv($self, $field[1], $field[2], $sfi, $k, $i, @field[6..8], $r); }; -# dbg('local', "Local::wwv2 error $@") if $@; +# dbg("Local::wwv2 error $@") if isdbg('local') if $@; return if $rep; # DON'T be silly and send on PC27s! @@ -858,9 +799,19 @@ sub normal if ($pcno == 24) { # set here status my $call = uc $field[1]; - my $ref = DXCluster->get_exact($call); - $ref->here($field[2]) if $ref; - last SWITCH; + my ($nref, $uref); + $nref = Route::Node::get($call); + $uref = Route::User::get($call); + return unless $nref || $uref; # if we don't know where they are, it's pointless sending it on + + unless (eph_dup($line)) { + $nref->here($field[2]) if $nref; + $uref->here($field[2]) if $uref; + my $ref = $nref || $uref; + return unless $self->in_filter_route($ref); + $self->route_pc24($ref, $field[3]); + } + return; } if ($pcno == 25) { # merge request @@ -869,7 +820,7 @@ sub normal return; } if ($field[2] eq $main::mycall) { - dbg('chan', "PCPROT: Trying to merge to myself, ignored"); + dbg("PCPROT: Trying to merge to myself, ignored") if isdbg('chanerr'); return; } @@ -907,9 +858,9 @@ sub normal if ($pcno == 34 || $pcno == 36) { # remote commands (incoming) if ($field[1] eq $main::mycall) { my $ref = DXUser->get_current($field[2]); - my $cref = DXCluster->get($field[2]); + my $cref = Route::Node::get($field[2]); Log('rcmd', 'in', $ref->{priv}, $field[2], $field[3]); - unless (!$cref || !$ref || $cref->mynode->call ne $ref->homenode) { # not allowed to relay RCMDS! + unless (!$cref || !$ref || $cref->call ne $ref->homenode) { # not allowed to relay RCMDS! if ($ref->{priv}) { # you have to have SOME privilege, the commands have further filtering $self->{remotecmd} = 1; # for the benefit of any command that needs to know my $oldpriv = $self->{priv}; @@ -972,15 +923,16 @@ sub normal if ($field[1] eq $self->{call}) { $self->disconnect(1); } else { - dbg('chan', "PCPROT: came in on wrong channel"); + dbg("PCPROT: came in on wrong channel") if isdbg('chanerr'); } return; } if ($pcno == 41) { # user info # add this station to the user database, if required - my $user = DXUser->get_current($field[1]); - $user = DXUser->new($field[1]) if !$user; + my $call = $field[1]; + my $user = DXUser->get_current($call); + $user = DXUser->new($call) if !$user; if ($field[2] == 1) { $user->name($field[3]); @@ -996,38 +948,53 @@ sub normal } $user->lastoper($main::systime); # to cut down on excessive for/opers being generated $user->put; - last SWITCH; + my $ref = Route::get($call) || Route->new($call); + + # input filter if required + return unless $self->in_filter_route($ref); + + $self->route_pc41($ref, $call, $field[2], $field[3], $field[4]) if $ref && !eph_dup($line); + return; } + if ($pcno == 43) { last SWITCH; } + if ($pcno == 37 || $pcno == 44 || $pcno == 45 || $pcno == 46 || $pcno == 47 || $pcno == 48) { DXDb::process($self, $line); return; } if ($pcno == 50) { # keep alive/user list - my $node = DXCluster->get_exact($field[1]); + my $call = $field[1]; + my $node = Route::Node::get($call); if ($node) { - return unless $node->isa('DXNode'); - return unless $node->dxchan == $self; - $node->update_users($field[2]); + return unless $node->call eq $self->{call}; + $node->usercount($field[2]); + + # input filter if required + return unless $self->in_filter_route($node); + + $self->route_pc50($node, $field[2], $field[3]) unless eph_dup($line); } - last SWITCH; + return; } if ($pcno == 51) { # incoming ping requests/answers + my $to = $field[1]; + my $from = $field[2]; + my $flag = $field[3]; # is it for us? - if ($field[1] eq $main::mycall) { - my $flag = $field[3]; + if ($to eq $main::mycall) { if ($flag == 1) { - $self->send(pc51($field[2], $field[1], '0')); + $self->send(pc51($from, $to, '0')); } else { # it's a reply, look in the ping list for this one - my $ref = $pings{$field[2]}; + my $ref = $pings{$from}; if ($ref) { - my $tochan = DXChannel->get($field[2]); + my $tochan = DXChannel->get($from); while (@$ref) { my $r = shift @$ref; my $dxchan = DXChannel->get($r->{call}); @@ -1036,7 +1003,7 @@ sub normal if ($dxchan->is_user) { my $s = sprintf "%.2f", $t; my $ave = sprintf "%.2f", $tochan ? ($tochan->{pingave} || $t) : $t; - $dxchan->send($dxchan->msg('pingi', $field[2], $s, $ave)) + $dxchan->send($dxchan->msg('pingi', $from, $s, $ave)) } elsif ($dxchan->is_node) { if ($tochan) { $tochan->{nopings} = $tochan->user->nopings || 2; # pump up the timer @@ -1054,29 +1021,31 @@ sub normal } } else { # route down an appropriate thingy - $self->route($field[1], $line); + $self->route($to, $line); } return; } if ($pcno == 75) { # dunno but route it - if ($field[1] ne $main::mycall) { - $self->route($field[1], $line); + my $call = $field[1]; + if ($call ne $main::mycall) { + $self->route($call, $line); } return; } if ($pcno == 73) { # WCY broadcasts + my $call = $field[1]; # do some de-duping - my $d = cltounix($field[1], sprintf("%02d18Z", $field[2])); + my $d = cltounix($call, sprintf("%02d18Z", $field[2])); if (($pcno == 23 && $d < $main::systime - $pc23_max_age) || $d > $main::systime + 1500 || $field[2] < 0 || $field[2] > 23) { - dbg('chan', "PCPROT: WCY Date ($field[1] $field[2]) out of range"); + dbg("PCPROT: WCY Date ($call $field[2]) out of range") if isdbg('chanerr'); return; } @field = map { unpad($_) } @field; if (WCY::dup($d,@field[3..7])) { - dbg('chan', "PCPROT: Dup WCY Spot ignored\n"); + dbg("PCPROT: Dup WCY Spot ignored\n") if isdbg('chanerr'); return; } @@ -1086,7 +1055,7 @@ sub normal eval { $rep = Local::wwv($self, @field[1..12]); }; - # dbg('local', "Local::wcy error $@") if $@; + # dbg("Local::wcy error $@") if isdbg('local') if $@; return if $rep; # broadcast to the eager world @@ -1095,11 +1064,12 @@ sub normal } if ($pcno == 84) { # remote commands (incoming) - if ($field[1] eq $main::mycall) { + my $call = $field[1]; + if ($call eq $main::mycall) { my $ref = DXUser->get_current($field[2]); - my $cref = DXCluster->get($field[2]); + my $cref = Route::Node::get($field[2]); Log('rcmd', 'in', $ref->{priv}, $field[2], $field[4]); - unless ($field[4] =~ /rcmd/i || !$cref || !$ref || $cref->mynode->call ne $ref->homenode) { # not allowed to relay RCMDS! + unless ($field[4] =~ /rcmd/i || !$cref || !$ref || $cref->call ne $ref->homenode) { # not allowed to relay RCMDS! if ($ref->{priv}) { # you have to have SOME privilege, the commands have further filtering $self->{remotecmd} = 1; # for the benefit of any command that needs to know my $oldpriv = $self->{priv}; @@ -1119,18 +1089,19 @@ sub normal $self->send(pc85($main::mycall, $field[2], $field[3],"$main::mycall:your attempt is logged, Tut tut tut...!")); } } else { - my $ref = DXUser->get_current($field[1]); + my $ref = DXUser->get_current($call); if ($ref && $ref->is_clx) { - $self->route($field[1], $line); + $self->route($call, $line); } else { - $self->route($field[1], pc34($field[2], $field[1], $field[4])); + $self->route($call, pc34($field[2], $call, $field[4])); } } return; } if ($pcno == 85) { # remote command replies - if ($field[1] eq $main::mycall) { + my $call = $field[1]; + if ($call eq $main::mycall) { my $dxchan = DXChannel->get($field[3]); if ($dxchan) { $dxchan->send($field[4]); @@ -1147,11 +1118,11 @@ sub normal } } } else { - my $ref = DXUser->get_current($field[1]); + my $ref = DXUser->get_current($call); if ($ref && $ref->is_clx) { - $self->route($field[1], $line); + $self->route($call, $line); } else { - $self->route($field[1], pc35($field[2], $field[1], $field[4])); + $self->route($call, pc35($field[2], $call, $field[4])); } } return; @@ -1165,9 +1136,13 @@ sub normal # NOTE - don't arrive here UNLESS YOU WANT this lump of protocol to be # REBROADCAST!!!! # - - unless ($self->{isolate}) { - broadcast_ak1a($line, $self); # send it to everyone but me + + if (eph_dup($line)) { + dbg("PCPROT: Ephemeral dup, dropped") if isdbg('chanerr'); + } else { + unless ($self->{isolate}) { + broadcast_ak1a($line, $self); # send it to everyone but me + } } } @@ -1188,7 +1163,9 @@ sub process # send a pc50 out on this channel $dxchan->{pc50_t} = $main::systime unless exists $dxchan->{pc50_t}; if ($t >= $dxchan->{pc50_t} + $DXProt::pc50_interval) { - $dxchan->send(pc50(scalar DXChannel::get_all_users)); + my $s = pc50($me, scalar DXChannel::get_all_users); + eph_dup($s); + $dxchan->send($s); $dxchan->{pc50_t} = $t; } @@ -1203,14 +1180,17 @@ sub process } } } + + # every ten seconds + if ($t - $last10 >= 10) { + # clean out ephemera + + eph_clean(); + + $last10 = $t; + } - my $key; - my $val; - my $cutoff; if ($main::systime - 3600 > $last_hour) { -# Spot::process; -# Geomag::process; -# AnnTalk::process; $last_hour = $main::systime; } } @@ -1222,84 +1202,57 @@ sub process # # some active measures # -sub send_route + +sub send_dx_spot { my $self = shift; my $line = shift; - my @dxchan = DXChannel::get_all_nodes(); + my @dxchan = DXChannel->get_all(); my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { - my $routeit; - my ($filter, $hops); - - if ($dxchan->{routefilter}) { - ($filter, $hops) = $dxchan->{routefilter}->it($self->{call}, @_); - next unless $filter; - } + next if $dxchan == $me; next if $dxchan == $self; - if ($hops) { - $routeit = $line; - $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; - } else { - $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; - } - if ($filter) { - $dxchan->send($routeit) if $routeit; - } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; - } + $dxchan->dx_spot($line, $self->{isolate}, @_, $self->{call}); } } -sub send_dx_spot +sub dx_spot { my $self = shift; my $line = shift; - my @dxchan = DXChannel->get_all(); - my $dxchan; - - # send it if it isn't the except list and isn't isolated and still has a hop count - # taking into account filtering and so on - foreach $dxchan (@dxchan) { - my $routeit; - my ($filter, $hops); + my $isolate = shift; + my ($filter, $hops); - if ($dxchan->{spotsfilter}) { - ($filter, $hops) = $dxchan->{spotsfilter}->it(@_, $self->{call} ); - next unless $filter; - } - - if ($dxchan->is_node) { - next if $dxchan == $self; - if ($hops) { - $routeit = $line; - $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; - } else { - $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; - } - if ($filter) { - $dxchan->send($routeit) if $routeit; - } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; - } - } elsif ($dxchan->is_user && $dxchan->{dx}) { - my $buf = Spot::formatb($dxchan->{user}->wantgrid, $_[0], $_[1], $_[2], $_[3], $_[4]); - $buf .= "\a\a" if $dxchan->{beep}; - $buf =~ s/\%5E/^/g; - if ($dxchan->{state} eq 'prompt' || $dxchan->{state} eq 'talk') { - $dxchan->send($buf); - } else { - $dxchan->delay($buf); - } - } + if ($self->{spotsfilter}) { + ($filter, $hops) = $self->{spotsfilter}->it(@_); + return unless $filter; } + send_prot_line($self, $filter, $hops, $isolate, $line) } +sub send_prot_line +{ + my ($self, $filter, $hops, $isolate, $line) = @_; + my $routeit; + + if ($hops) { + $routeit = $line; + $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; + } else { + $routeit = adjust_hops($self, $line); # adjust its hop count by node name + next unless $routeit; + } + if ($filter) { + $self->send($routeit) if $routeit; + } else { + $self->send($routeit) unless $self->{isolate} || $isolate; + } +} + + sub send_wwv_spot { my $self = shift; @@ -1323,38 +1276,28 @@ sub send_wwv_spot # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { + next if $dxchan == $self; + next if $dxchan == $me; my $routeit; my ($filter, $hops); - if ($dxchan->{wwvfilter}) { - ($filter, $hops) = $dxchan->{wwvfilter}->it(@_, $self->{call}, $wwv_dxcc, $wwv_itu, $wwv_cq, $org_dxcc, $org_itu, $org_cq); - next unless $filter; - } - if ($dxchan->is_node) { - next if $dxchan == $self; - if ($hops) { - $routeit = $line; - $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; - } else { - $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; - } - if ($filter) { - $dxchan->send($routeit) if $routeit; - } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; - - } - } elsif ($dxchan->is_user && $dxchan->{wwv}) { - my $buf = "WWV de $_[6] <$_[1]>: SFI=$_[2], A=$_[3], K=$_[4], $_[5]"; - $buf .= "\a\a" if $dxchan->{beep}; - if ($dxchan->{state} eq 'prompt' || $dxchan->{state} eq 'talk') { - $dxchan->send($buf); - } else { - $dxchan->delay($buf); - } - } + $dxchan->wwv($line, $self->{isolate}, @_, $self->{call}, $wwv_dxcc, $wwv_itu, $wwv_cq, $org_dxcc, $org_itu, $org_cq); + } + +} + +sub wwv +{ + my $self = shift; + my $line = shift; + my $isolate = shift; + my ($filter, $hops); + + if ($self->{wwvfilter}) { + ($filter, $hops) = $self->{wwvfilter}->it(@_); + return unless $filter; } + send_prot_line($self, $filter, $hops, $isolate, $line) } sub send_wcy_spot @@ -1380,37 +1323,25 @@ sub send_wcy_spot # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { - my $routeit; - my ($filter, $hops); + next if $dxchan == $me; + next if $dxchan == $self; - if ($dxchan->{wcyfilter}) { - ($filter, $hops) = $dxchan->{wcyfilter}->it(@_, $self->{call}, $wcy_dxcc, $wcy_itu, $wcy_cq, $org_dxcc, $org_itu, $org_cq); - next unless $filter; - } - if ($dxchan->is_clx || $dxchan->is_spider || $dxchan->is_dxnet) { - next if $dxchan == $self; - if ($hops) { - $routeit = $line; - $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; - } else { - $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; - } - if ($filter) { - $dxchan->send($routeit) if $routeit; - } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; - } - } elsif ($dxchan->is_user && $dxchan->{wcy}) { - my $buf = "WCY de $_[10] <$_[1]> : K=$_[4] expK=$_[5] A=$_[3] R=$_[6] SFI=$_[2] SA=$_[7] GMF=$_[8] Au=$_[9]"; - $buf .= "\a\a" if $dxchan->{beep}; - if ($dxchan->{state} eq 'prompt' || $dxchan->{state} eq 'talk') { - $dxchan->send($buf); - } else { - $dxchan->delay($buf); - } - } + $dxchan->wcy($line, $self->{isolate}, @_, $self->{call}, $wcy_dxcc, $wcy_itu, $wcy_cq, $org_dxcc, $org_itu, $org_cq); + } +} + +sub wcy +{ + my $self = shift; + my $line = shift; + my $isolate = shift; + my ($filter, $hops); + + if ($self->{wcyfilter}) { + ($filter, $hops) = $self->{wcyfilter}->it(@_); + return unless $filter; } + send_prot_line($self, $filter, $hops, $isolate, $line) if $self->is_clx || $self->is_spider || $self->is_dxnet; } # send an announce @@ -1420,9 +1351,9 @@ sub send_announce my $line = shift; my @dxchan = DXChannel->get_all(); my $dxchan; - my $text = unpad($_[2]); my $target; my $to = 'To '; + my $text = unpad($_[2]); if ($_[3] eq '*') { # sysops $target = "SYSOP"; @@ -1457,45 +1388,32 @@ sub send_announce # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { + next if $dxchan == $self; + next if $dxchan == $me; my $routeit; my ($filter, $hops); - if ($dxchan->{annfilter}) { - ($filter, $hops) = $dxchan->{annfilter}->it(@_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq); - next unless $filter; - } - if ($dxchan->is_node && $_[1] ne $main::mycall) { # i.e not specifically routed to me - next if $dxchan == $self; - if ($hops) { - $routeit = $line; - $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; - } else { - $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name - next unless $routeit; - } - if ($filter) { - $dxchan->send($routeit) if $routeit; - } else { - $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; - - } - } elsif ($dxchan->is_user) { - unless ($dxchan->{ann}) { - next if $_[0] ne $main::myalias && $_[0] ne $main::mycall; - } - next if $target eq 'SYSOP' && $dxchan->{priv} < 5; - my $buf = "$to$target de $_[0]: $text"; - $buf =~ s/\%5E/^/g; - $buf .= "\a\a" if $dxchan->{beep}; - if ($dxchan->{state} eq 'prompt' || $dxchan->{state} eq 'talk') { - $dxchan->send($buf); - } else { - $dxchan->delay($buf); - } - } + $dxchan->announce($line, $self->{isolate}, $to, $target, $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq) + } +} + +sub announce +{ + my $self = shift; + my $line = shift; + my $isolate = shift; + my $to = shift; + my $target = shift; + my ($filter, $hops); + + if ($self->{annfilter}) { + ($filter, $hops) = $self->{annfilter}->it(@_); + return unless $filter; } + send_prot_line($self, $filter, $hops, $isolate, $line) unless $_[1] eq $main::mycall; } + sub send_local_config { my $self = shift; @@ -1503,36 +1421,35 @@ sub send_local_config my @nodes; my @localnodes; my @remotenodes; - + + dbg('DXProt::send_local_config') if isdbg('trace'); + # send our nodes if ($self->{isolate}) { - @localnodes = (DXCluster->get_exact($main::mycall)); + @localnodes = ( $main::routeroot ); } else { # create a list of all the nodes that are not connected to this connection # and are not themselves isolated, this to make sure that isolated nodes # don't appear outside of this node - @nodes = DXNode::get_all(); - @nodes = grep { $_->{call} ne $main::mycall } @nodes; - @nodes = grep { $_->dxchan != $self } @nodes if @nodes; - @nodes = grep { !$_->dxchan->{isolate} } @nodes if @nodes; - @localnodes = grep { $_->dxchan->{call} eq $_->{call} } @nodes if @nodes; - unshift @localnodes, DXCluster->get_exact($main::mycall); - @remotenodes = grep { $_->dxchan->{call} ne $_->{call} } @nodes if @nodes; - } - - my @s = $me->pc19(@localnodes, @remotenodes); - for (@s) { - my $routeit = adjust_hops($self, $_); - $self->send($routeit) if $routeit; + my @dxchan = grep { $_->call ne $main::mycall && $_->call ne $self->{call} } DXChannel::get_all_nodes(); + @localnodes = map { my $r = Route::Node::get($_->{call}); $r ? $r : () } @dxchan if @dxchan; + my @intcalls = map { $_->nodes } @localnodes if @localnodes; + my $ref = Route::Node::get($self->{call}); + my @rnodes = $ref->nodes; + for my $n (@intcalls) { + push @remotenodes, Route::Node::get($n) unless grep $n eq $_, @rnodes; + } + unshift @localnodes, $main::routeroot; } + send_route($self, \&pc19, scalar(@localnodes)+scalar(@remotenodes), @localnodes, @remotenodes); + # get all the users connected on the above nodes and send them out foreach $n (@localnodes, @remotenodes) { - my @users = values %{$n->list}; - my @s = pc16($n, @users); - for (@s) { - my $routeit = adjust_hops($self, $_); - $self->send($routeit) if $routeit; + if ($n) { + send_route($self, \&pc16, 1, $n, map {my $r = Route::User::get($_); $r ? ($r) : ()} $n->users); + } else { + dbg("sent a null value") if isdbg('chanerr'); } } } @@ -1547,18 +1464,18 @@ sub route my ($self, $call, $line) = @_; if (ref $self && $call eq $self->{call}) { - dbg('chan', "PCPROT: Trying to route back to source, dropped"); + dbg("PCPROT: Trying to route back to source, dropped") if isdbg('chanerr'); return; } # always send it down the local interface if available my $dxchan = DXChannel->get($call); unless ($dxchan) { - my $cl = DXCluster->get_exact($call); + my $cl = Route::get($call); $dxchan = $cl->dxchan if $cl; if (ref $dxchan) { if (ref $self && $dxchan eq $self) { - dbg('chan', "PCPROT: Trying to route back to source, dropped"); + dbg("PCPROT: Trying to route back to source, dropped") if isdbg('chanerr'); return; } } @@ -1566,10 +1483,10 @@ sub route if ($dxchan) { my $routeit = adjust_hops($dxchan, $line); # adjust its hop count by node name if ($routeit) { - $dxchan->send($routeit); + $dxchan->send($routeit) unless $dxchan == $me; } } else { - dbg('chan', "PCPROT: No route available, dropped"); + dbg("PCPROT: No route available, dropped") if isdbg('chanerr'); } } @@ -1647,7 +1564,7 @@ sub broadcast_list ($filter) = $dxchan->{spotsfilter}->it(@{$fref}) if ref $fref; next unless $filter; } - next if $sort eq 'ann' && !$dxchan->{ann}; + next if $sort eq 'ann' && !$dxchan->{ann} && $s !~ /^To\s+LOCAL\s+de\s+(?:$main::myalias|$main::mycall)/i; next if $sort eq 'wwv' && !$dxchan->{wwv}; next if $sort eq 'wcy' && !$dxchan->{wcy}; next if $sort eq 'wx' && !$dxchan->{wx}; @@ -1744,9 +1661,10 @@ sub addrcmd $r->{t} = $main::systime; $r->{cmd} = $cmd; $rcmds{$to} = $r; - - my $ref = DXCluster->get_exact($to); - if ($ref && $ref->dxchan && $ref->dxchan->is_clx) { + + my $ref = Route::Node::get($to); + my $dxchan = $ref->dxchan; + if ($dxchan && $dxchan->is_clx) { route(undef, $to, pc84($main::mycall, $to, $self->{call}, $cmd)); } else { route(undef, $to, pc34($main::mycall, $to, $cmd)); @@ -1764,38 +1682,22 @@ sub disconnect } # do routing stuff - my $pref = Route::Node::get($self->{call}); - my @rout = $pref->del_nodes if $pref; - push @rout, $main::routeroot->del_node($call); - dbg('route', "B/C PC21 (from PC39) for: " . join(',', (map{ $_->call } @rout))) if @rout; + my $node = Route::Node::get($call); + my @rout; + if ($node) { + @rout = $node->del_nodes; # at the next level + @rout = $node->del($main::routeroot); + } # unbusy and stop and outgoing mail my $mref = DXMsg::get_busy($call); $mref->stop_msg($call) if $mref; - # create a list of all the nodes that have gone and delete them from the table - my @nodes; - foreach my $node (grep { $_->dxchancall eq $call } DXNode::get_all) { - next if $node->call eq $call; - next if $node->call eq $main::mycall; - push @nodes, $node->call; - $node->del; - } - # broadcast to all other nodes that all the nodes connected to via me are gone unless ($pc39flag && $pc39flag == 2) { - unless ($self->{isolate}) { - push @nodes, $call; - for (@nodes) { - broadcast_ak1a(pc21($_, 'Gone.'), $self); - } - } + $self->route_pc21(@rout) if @rout; } - # remove this node from the tables - my $node = DXCluster->get_exact($call); - $node->del if $node; - # remove outstanding pings delete $pings{$call}; @@ -1822,5 +1724,146 @@ sub talk $self->send(DXProt::pc10($from, $to, $via, $line)); Log('talk', $self->call, $from, $via?$via:$main::mycall, $line); } + +# send it if it isn't the except list and isn't isolated and still has a hop count +# taking into account filtering and so on +sub send_route +{ + my $self = shift; + my $generate = shift; + my $no = shift; # the no of things to filter on + my $routeit; + my ($filter, $hops); + my @rin; + + for (; @_ && $no; $no--) { + my $r = shift; + + if ($self->{routefilter}) { + $filter = undef; + if ($r) { + ($filter, $hops) = $self->{routefilter}->it($self->{call}, $self->{dxcc}, $self->{itu}, $self->{cq}, $r->call, $r->dxcc, $r->itu, $r->cq); + if ($filter) { + push @rin, $r; + } else { + dbg("DXPROT: $self->{call}/" . $r->call . " rejected by output filter") if isdbg('chanerr'); + } + } else { + dbg("was sent a null value") if isdbg('chanerr'); + } + } else { + push @rin, $r; + } + } + if (@rin) { + foreach my $line (&$generate(@rin, @_)) { + if ($hops) { + $routeit = $line; + $routeit =~ s/\^H\d+\^\~$/\^H$hops\^\~/; + } else { + $routeit = adjust_hops($self, $line); # adjust its hop count by node name + next unless $routeit; + } + $self->send($routeit) if $self->{routefilter} || !$self->{isolate}; + } + } +} + +sub broadcast_route +{ + my $self = shift; + my $generate = shift; + my @dxchan = DXChannel::get_all_nodes(); + my $dxchan; + my $line; + + foreach $dxchan (@dxchan) { + next if $dxchan == $self; + next if $dxchan == $me; + if ($dxchan->{routefilter} || !$self->{isolate}) { + $dxchan->send_route($generate, @_) + } else { + dbg('DXPROT: isolated') if isdbg('chanerr'); + } + } +} + +sub route_pc16 +{ + my $self = shift; + broadcast_route($self, \&pc16, 1, @_); +} + +sub route_pc17 +{ + my $self = shift; + broadcast_route($self, \&pc17, 1, @_); +} + +sub route_pc19 +{ + my $self = shift; + broadcast_route($self, \&pc19, scalar @_, @_); +} + +sub route_pc21 +{ + my $self = shift; + broadcast_route($self, \&pc21, scalar @_, @_); +} + +sub route_pc24 +{ + my $self = shift; + broadcast_route($self, \&pc24, 1, @_); +} + +sub route_pc41 +{ + my $self = shift; + broadcast_route($self, \&pc41, 1, @_); +} + +sub route_pc50 +{ + my $self = shift; + broadcast_route($self, \&pc50, 1, @_); +} + +sub in_filter_route +{ + my $self = shift; + my $r = shift; + my ($filter, $hops) = (1, 1); + + if ($self->{inroutefilter}) { + ($filter, $hops) = $self->{inroutefilter}->it($self->{call}, $self->{dxcc}, $self->{itu}, $self->{cq}, $r->call, $r->dxcc, $r->itu, $r->cq); + dbg("PCPROT: $self->{call}/" . $r->call . ' rejected by in_filter_route') if !$filter && isdbg('chanerr'); + } + return $filter; +} + +sub eph_dup +{ + my $s = shift; + + # chop the end off + $s =~ s/\^H\d\d?\^?~?$//; + return 1 if exists $eph{$s}; + $eph{$s} = $main::systime; + return undef; +} + +sub eph_clean +{ + my ($key, $val); + + while (($key, $val) = each %eph) { + if ($main::systime - $val > 90) { + delete $eph{$key}; + } + } +} + 1; __END__ diff --git a/perl/DXProtout.pm b/perl/DXProtout.pm index 1ebb29bc..95c19813 100644 --- a/perl/DXProtout.pm +++ b/perl/DXProtout.pm @@ -67,36 +67,42 @@ sub pc12 # # add one or more users (I am expecting references that have 'call', -# 'confmode' & 'here' method) +# 'conf' & 'here' method) # # this will create a list of PC16 with up pc16_max_users in each # called $self->pc16(..) # sub pc16 { - my $self = shift; + my $node = shift; + my $ncall = $node->call; my @out; - my $i; - for ($i = 0; @_; ) { - my $str = "PC16^$self->{call}"; - for ( ; @_ && length $str < 200; $i++) { + while (@_) { + my $str = "PC16^$ncall"; + for ( ; @_ && length $str < 200; ) { my $ref = shift; - $str .= sprintf "^%s %s %d", $ref->call, $ref->confmode ? '*' : '-', $ref->here; + $str .= sprintf "^%s %s %d", $ref->call, $ref->conf ? '*' : '-', $ref->here; } $str .= sprintf "^%s^", get_hops(16); push @out, $str; - $i = 0; } - 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 @out; + while (@_) { + my $node = shift; + my $ref = shift; + my $hops = get_hops(17); + my $ncall = $node->call; + my $ucall = $ref->call; + push @out, "PC17^$ucall^$ncall^$hops^"; + } + return @out; } # Request init string @@ -110,22 +116,20 @@ sub pc18 # sub pc19 { - my $self = shift; my @out; - my $i; - - for ($i = 0; @_; ) { + while(@_) { my $str = "PC19"; - for (; @_ && length $str < 200; $i++) { + for (; @_ && length $str < 200;) { my $ref = shift; - my $here = $ref->{here} ? '1' : '0'; - my $confmode = $ref->{confmode} ? '1' : '0'; - $str .= "^$here^$ref->{call}^$confmode^$ref->{pcversion}"; + my $call = $ref->call; + my $here = $ref->here; + my $conf = $ref->conf; + my $version = $ref->version; + $str .= "^$here^$call^$conf^$version"; } $str .= sprintf "^%s^", get_hops(19); push @out, $str; - $i = 0; } return @out; } @@ -139,10 +143,14 @@ sub pc20 # delete a node sub pc21 { - my ($call, $reason) = @_; - my $hops = get_hops(21); - $reason = "Gone." if !$reason; - return "PC21^$call^$reason^$hops^"; + my @out; + while (@_) { + my $node = shift; + my $hops = get_hops(21); + my $call = $node->call; + push @out, "PC21^$call^Gone^$hops^"; + } + return @out; } # end of init phase @@ -157,7 +165,7 @@ sub pc24 my $self = shift; my $call = $self->call; my $flag = $self->here ? '1' : '0'; - my $hops = get_hops(24); + my $hops = shift || get_hops(24); return "PC24^$call^$flag^$hops^"; } @@ -187,6 +195,7 @@ sub pc28 my $time = ztime($t); $private = $private ? '1' : '0'; $rr = $rr ? '1' : '0'; + $subject ||= ' '; return "PC28^$tonode^$fromnode^$to^$from^$date^$time^$private^$subject^ ^5^$rr^ ^$origin^~"; } @@ -244,8 +253,7 @@ sub pc35 # send all the DX clusters I reckon are connected sub pc38 { - my @nodes = map { ($_->dxchan && $_->dxchan->isolate) ? () : $_->call } DXNode->get_all(); - return "PC38^" . join(',', @nodes) . "^~"; + return join '^', "PC38", map {$_->call} Route::Node::get_all(); } # tell the local node to discconnect @@ -268,9 +276,12 @@ sub pc40 # user info sub pc41 { - my ($call, $sort, $info) = @_; - my $hops = get_hops(41); - $sort = $sort ? "$sort" : '0'; + my $call = shift; + $call = shift if ref $call; + + my $sort = shift || '0'; + my $info = shift || ' '; + my $hops = shift || get_hops(41); return "PC41^$call^$sort^$info^$hops^~"; } @@ -314,9 +325,11 @@ sub pc49 # periodic update of users, plus keep link alive device (always H99) sub pc50 { - my $n = shift; - $n = 0 unless $n >= 0; - return "PC50^$main::mycall^$n^H99^"; + my $self = shift; + my $call = $self->call; + my $n = shift || '0'; + my $hops = shift || 'H99'; + return "PC50^$call^$n^$hops^"; } # generate pings diff --git a/perl/DXUser.pm b/perl/DXUser.pm index ca73a02e..52b7819d 100644 --- a/perl/DXUser.pm +++ b/perl/DXUser.pm @@ -63,8 +63,9 @@ $lasttime = 0; pingint => '9,Node Ping interval', nopings => '9,Ping Obs Count', wantlogininfo => '9,Login info req,yesno', - wantgrid => '0,DX Grid Info,yesno', + wantgrid => '0,DX Grid Info,yesno', lastoper => '9,Last for/oper,cldatetime', + nothere => '0,Not Here Text', ); no strict; @@ -243,8 +244,8 @@ sub decode my $ref; eval '$ref = ' . $s; if ($@) { - dbg('err', $@) if $@; - Log('err', $@) if $@; + dbg($@); + Log('err', $@); $ref = undef; } return $ref; diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index 4efb3484..7b33b6e2 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -50,7 +50,7 @@ sub send_raw my $sock = $conn->{sock}; return unless defined($sock); push (@{$conn->{outqueue}}, $msg); - dbg('connect', "connect $conn->{cnum}: $msg") unless $conn->{state} eq 'C'; + dbg("connect $conn->{cnum}: $msg") if $conn->{state} ne 'C' && isdbg('connect'); Msg::set_event_handler ($sock, "write" => sub {$conn->_send(0)}); } @@ -65,7 +65,7 @@ sub dequeue if ($conn->{state} eq 'WC') { if (exists $conn->{cmd}) { if (@{$conn->{cmd}}) { - dbg('connect', "connect $conn->{cnum}: $conn->{msg}"); + dbg("connect $conn->{cnum}: $conn->{msg}") if isdbg('connect'); $conn->_docmd($conn->{msg}); } } @@ -80,7 +80,7 @@ sub dequeue $conn->{msg} = pop @lines; } while (defined ($msg = shift @lines)) { - dbg('connect', "connect $conn->{cnum}: $msg") unless $conn->{state} eq 'C'; + dbg("connect $conn->{cnum}: $msg") if $conn->{state} ne 'C' && isdbg('connect'); $msg =~ s/\xff\xfa.*\xff\xf0|\xff[\xf0-\xfe].//g; # remove telnet options $msg =~ s/[\x00-\x08\x0a-\x19\x1b-\x1f\x80-\x9f]/./g; # immutable CSI sequence + control characters @@ -118,7 +118,7 @@ sub to_connected $conn->{timeout}->del if $conn->{timeout}; delete $conn->{timeout}; &{$conn->{rproc}}($conn, "$dir$call|$sort"); - $conn->_send_file("$main::data/connected"); + $conn->_send_file("$main::data/connected") unless $conn->{outgoing}; } sub new_client { @@ -131,13 +131,13 @@ sub new_client { $conn->{blocking} = 0; eval {$conn->{peerhost} = $sock->peerhost}; if ($@) { - dbg('conn', $@); + dbg($@) if isdbg('connll'); $conn->disconnect; } else { eval {$conn->{peerport} = $sock->peerport}; $conn->{peerport} = 0 if $@; my ($rproc, $eproc) = &{$server_conn->{rproc}} ($conn, $conn->{peerhost}, $conn->{peerport}); - dbg('connll', "accept $conn->{cnum} from $conn->{peerhost} $conn->{peerport}"); + dbg("accept $conn->{cnum} from $conn->{peerhost} $conn->{peerport}") if isdbg('connll'); if ($eproc) { $conn->{eproc} = $eproc; Msg::set_event_handler ($sock, "error" => $eproc); @@ -160,7 +160,7 @@ sub new_client { } } } else { - dbg('err', "ExtMsg: error on accept ($!)"); + dbg("ExtMsg: error on accept ($!)") if isdbg('err'); } } @@ -169,6 +169,7 @@ sub start_connect my $call = shift; my $fn = shift; my $conn = ExtMsg->new(\&main::new_channel); + $conn->{outgoing} = 1; $conn->conns($call); my $f = new IO::File $fn; @@ -217,16 +218,16 @@ sub _doconnect my $r; $sort = lc $sort; - dbg('connect', "CONNECT $conn->{cnum} sort: $sort command: $line"); + dbg("CONNECT $conn->{cnum} sort: $sort command: $line") if isdbg('connect'); if ($sort eq 'telnet') { # this is a straight network connect my ($host, $port) = split /\s+/, $line; $port = 23 if !$port; $r = $conn->connect($host, $port); if ($r) { - dbg('connect', "Connected $conn->{cnum} to $host $port"); + dbg("Connected $conn->{cnum} to $host $port") if isdbg('connect'); } else { - dbg('connect', "***Connect $conn->{cnum} Failed to $host $port $!"); + dbg("***Connect $conn->{cnum} Failed to $host $port $!") if isdbg('connect'); } } elsif ($sort eq 'agw') { # turn it into an AGW object @@ -251,7 +252,7 @@ sub _doconnect my $callback = sub {$conn->_rcv}; Msg::set_event_handler ($a, read => $callback); } - dbg('connect', "connect $conn->{cnum}: started pid: $conn->{pid} as $line"); + dbg("connect $conn->{cnum}: started pid: $conn->{pid} as $line") if isdbg('connect'); } else { $^W = 0; dbgclose(); @@ -267,17 +268,17 @@ sub _doconnect $SIG{HUP} = $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = 'DEFAULT'; alarm(0); } - exec "$line" or dbg('err', "exec '$line' failed $!"); + exec "$line" or dbg("exec '$line' failed $!"); } } else { - dbg('err', "cannot fork"); + dbg("cannot fork"); $r = undef; } } else { - dbg('err', "no socket pair $!"); + dbg("no socket pair $!"); } } else { - dbg('err', "invalid type of connection ($sort)"); + dbg("invalid type of connection ($sort)"); } $conn->disconnect unless $r; return $r; @@ -287,7 +288,7 @@ sub _doabort { my $conn = shift; my $string = shift; - dbg('connect', "connect $conn->{cnum}: abort $string"); + dbg("connect $conn->{cnum}: abort $string") if isdbg('connect'); $conn->{abort} = $string; } @@ -295,7 +296,7 @@ sub _dotimeout { my $conn = shift; my $val = shift; - dbg('connect', "connect $conn->{cnum}: timeout set to $val"); + dbg("connect $conn->{cnum}: timeout set to $val") if isdbg('connect'); $conn->{timeout}->del if $conn->{timeout}; $conn->{timeval} = $val; $conn->{timeout} = Timer->new($val, sub{ &_timedout($conn) }); @@ -305,7 +306,7 @@ sub _dolineend { my $conn = shift; my $val = shift; - dbg('connect', "connect $conn->{cnum}: lineend set to $val "); + dbg("connect $conn->{cnum}: lineend set to $val ") if isdbg('connect'); $val =~ s/\\r/\r/g; $val =~ s/\\n/\n/g; $conn->{lineend} = $val; @@ -320,16 +321,16 @@ sub _dochat if ($line) { my ($expect, $send) = $cmd =~ /^\s*\'(.*)\'\s+\'(.*)\'/; if ($expect) { - dbg('connect', "connect $conn->{cnum}: expecting: \"$expect\" received: \"$line\""); + dbg("connect $conn->{cnum}: expecting: \"$expect\" received: \"$line\"") if isdbg('connect'); if ($conn->{abort} && $line =~ /\Q$conn->{abort}/i) { - dbg('connect', "connect $conn->{cnum}: aborted on /$conn->{abort}/"); + dbg("connect $conn->{cnum}: aborted on /$conn->{abort}/") if isdbg('connect'); $conn->disconnect; delete $conn->{cmd}; return; } if ($line =~ /\Q$expect/i) { if (length $send) { - dbg('connect', "connect $conn->{cnum}: got: \"$expect\" sending: \"$send\""); + dbg("connect $conn->{cnum}: got: \"$expect\" sending: \"$send\"") if isdbg('connect'); $conn->send_later("D$conn->{call}|$send"); } delete $conn->{msg}; # get rid any input if a match @@ -344,7 +345,7 @@ sub _dochat sub _timedout { my $conn = shift; - dbg('connect', "connect $conn->{cnum}: timed out after $conn->{timeval} seconds"); + dbg("connect $conn->{cnum}: timed out after $conn->{timeval} seconds") if isdbg('connect'); $conn->disconnect; } @@ -374,7 +375,7 @@ sub _send_file while (<$f>) { chomp; my $l = $_; - dbg('connll', "connect $conn->{cnum}: $l"); + dbg("connect $conn->{cnum}: $l") if isdbg('connll'); $conn->send_raw($l . $conn->{lineend}); } $f->close; diff --git a/perl/Filter.pm b/perl/Filter.pm index fbdb4f30..031ec926 100644 --- a/perl/Filter.pm +++ b/perl/Filter.pm @@ -89,7 +89,7 @@ sub compile if ($@) { my $sort = $ref->{sort}; my $name = $ref->{name}; - dbg('err', "Error compiling $ar $sort $name: $@"); + dbg("Error compiling $ar $sort $name: $@"); Log('err', "Error compiling $ar $sort $name: $@"); } $rr = $@; @@ -107,7 +107,7 @@ sub read_in $in = undef; my $s = readfilestr($fn); my $newin = eval $s; - dbg('conn', "$@") if $@; + dbg($@) if $@; if ($in) { $newin = new('Filter::Old', $sort, $call, $flag); $newin->{filter} = $in; @@ -187,10 +187,15 @@ sub it my $filter; my @keys = sort $self->getfilkeys; my $key; + my $type = 'Dunno'; + my $asc = '?'; + my $r = @keys > 0 ? 0 : 1; foreach $key (@keys) { $filter = $self->{$key}; if ($filter->{reject} && exists $filter->{reject}->{code}) { + $type = 'reject'; + $asc = $filter->{reject}->{user}; if (&{$filter->{reject}->{code}}(\@_)) { $r = 0; last; @@ -199,6 +204,8 @@ sub it } } if ($filter->{accept} && exists $filter->{accept}->{code}) { + $type = 'accept'; + $asc = $filter->{accept}->{user}; if (&{$filter->{accept}->{code}}(\@_)) { $r = 1; last; @@ -211,6 +218,15 @@ sub it # hops are done differently (simply) my $hops = $self->{hops} if exists $self->{hops}; + if (isdbg('filter')) { + my $args = join '\',\'', @_; + my $true = $r ? "OK " : "REJ"; + my $sort = $self->{sort}; + my $dir = $self->{name} =~ /^in_/i ? "IN " : "OUT"; + + my $h = $hops || ''; + dbg("$true $dir: $type/$sort with $asc on '$args' $h") if isdbg('filter'); + } return ($r, $hops); } @@ -271,7 +287,8 @@ sub install my $remove = shift; my $name = uc $self->{name}; my $sort = $self->{sort}; - my $in = "in" if $name =~ s/^IN_//; + my $in = ""; + $in = "in" if $name =~ s/^IN_//; $name =~ s/.PL$//; my $dxchan = DXChannel->get($name); diff --git a/perl/Internet.pm b/perl/Internet.pm index 32c62742..b6a387ee 100644 --- a/perl/Internet.pm +++ b/perl/Internet.pm @@ -40,6 +40,25 @@ $qrz_uid = undef; $qrz_pw = undef; +# +# the address of any HTTP proxy you might be using +# +# leave as is unless you need one +# +# eg: $http_proxy = 'wwwcache.demon.co.uk'; +# + +$http_proxy = undef; + +# +# HTTP proxy port - again leave alone unless you need this +# +# eg: $http_proxy_port = 8080; +# + +$http_proxy_port = undef; + + # # end # diff --git a/perl/Messages b/perl/Messages index a9a1be91..98cf96db 100644 --- a/perl/Messages +++ b/perl/Messages @@ -172,6 +172,7 @@ package DXM; nodeu => '$_[0] set back as a User', nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line', notdone => 'NOT Done', + nothere => 'Sorry, but $_[0] isn\'t here at the moment, please try later', obscount => 'Ping obsolescence count on $_[0] set to $_[1]', ok => 'Operation successful', outconn => 'Outstanding connect to $_[0]', diff --git a/perl/Msg.pm b/perl/Msg.pm index 8be2fc1b..94f19e6f 100644 --- a/perl/Msg.pm +++ b/perl/Msg.pm @@ -80,7 +80,7 @@ sub new $noconns++; - dbg('connll', "Connection created ($noconns)"); + dbg("Connection created ($noconns)") if isdbg('connll'); return bless $conn, $class; } @@ -122,11 +122,11 @@ sub conns if (ref $pkg) { $call = $pkg->{call} unless $call; return undef unless $call; - dbg('connll', "changing $pkg->{call} to $call") if exists $pkg->{call} && $call ne $pkg->{call}; + dbg("changing $pkg->{call} to $call") if isdbg('connll') && exists $pkg->{call} && $call ne $pkg->{call}; delete $conns{$pkg->{call}} if exists $pkg->{call} && exists $conns{$pkg->{call}} && $pkg->{call} ne $call; $pkg->{call} = $call; $ref = $conns{$call} = $pkg; - dbg('connll', "Connection $pkg->{cnum} $call stored"); + dbg("Connection $pkg->{cnum} $call stored") if isdbg('connll'); } else { $ref = $conns{$call}; } @@ -199,7 +199,7 @@ sub disconnect { delete $conns{$call} if $ref && $ref == $conn; } $call ||= 'unallocated'; - dbg('connll', "Connection $conn->{cnum} $call disconnected"); + dbg("Connection $conn->{cnum} $call disconnected") if isdbg('connll'); unless ($main::is_win) { kill 'TERM', $conn->{pid} if exists $conn->{pid}; @@ -427,7 +427,7 @@ sub new_client { $conn->disconnect(); } } else { - dbg('err', "Msg: error on accept ($!)"); + dbg("Msg: error on accept ($!)") if isdbg('err'); } } @@ -536,7 +536,7 @@ sub DESTROY my $call = $conn->{call} || 'unallocated'; my $host = $conn->{peerhost} || ''; my $port = $conn->{peerport} || ''; - dbg('connll', "Connection $conn->{cnum} $call [$host $port] being destroyed"); + dbg("Connection $conn->{cnum} $call [$host $port] being destroyed") if isdbg('connll'); $noconns--; } diff --git a/perl/Route.pm b/perl/Route.pm index cbc172dd..61d07249 100644 --- a/perl/Route.pm +++ b/perl/Route.pm @@ -15,23 +15,52 @@ package Route; use DXDebug; +use DXChannel; +use Prefix; use strict; -use vars qw(%list %valid); +use vars qw(%list %valid $filterdef); %valid = ( call => "0,Callsign", flags => "0,Flags,phex", + dxcc => '0,Country Code', + itu => '0,ITU Zone', + cq => '0,CQ Zone', ); +$filterdef = bless ([ + # tag, sort, field, priv, special parser + ['channel', 'c', 0], + ['channel_dxcc', 'n', 1], + ['channel_itu', 'n', 2], + ['channel_zone', 'n', 3], + ['call', 'c', 4], + ['call_dxcc', 'n', 5], + ['call_itu', 'n', 6], + ['call_zone', 'n', 7], + ], 'Filter::Cmd'); + + sub new { my ($pkg, $call) = @_; + $pkg = ref $pkg if ref $pkg; - dbg('routelow', "create " . (ref($pkg) || $pkg) ." with $call"); + my $self = bless {call => $call}, $pkg; + dbg("create $pkg with $call") if isdbg('routelow'); + + # add in all the dxcc, itu, zone info + my @dxcc = Prefix::extract($call); + if (@dxcc > 0) { + $self->{dxcc} = $dxcc[1]->dxcc; + $self->{itu} = $dxcc[1]->itu; + $self->{cq} = $dxcc[1]->cq; + } + $self->{flags} = here(1); - return bless {call => $call}, (ref $pkg || $pkg); + return $self; } # @@ -60,7 +89,7 @@ sub _addlist my $call = _getcall($c); unless (grep {$_ eq $call} @{$self->{$field}}) { push @{$self->{$field}}, $call; - dbg('routelow', ref($self) . " adding $call to " . $self->{call} . "->\{$field\}"); + dbg(ref($self) . " adding $call to " . $self->{call} . "->\{$field\}") if isdbg('routelow'); } } return $self->{$field}; @@ -74,7 +103,7 @@ sub _dellist my $call = _getcall($c); if (grep {$_ eq $call} @{$self->{$field}}) { $self->{$field} = [ grep {$_ ne $call} @{$self->{$field}} ]; - dbg('routelow', ref($self) . " deleting $call from " . $self->{call} . "->\{$field\}"); + dbg(ref($self) . " deleting $call from " . $self->{call} . "->\{$field\}") if isdbg('routelow'); } } return $self->{$field}; @@ -83,15 +112,21 @@ sub _dellist # # flag field constructors/enquirers # +# These can be called in various ways:- +# +# Route::here or $ref->here returns 1 or 0 depending on value of the here flag +# Route::here(1) returns 2 (the bit value of the here flag) +# $ref->here(1) or $ref->here(0) sets the here flag +# sub here { my $self = shift; my $r = shift; return $self ? 2 : 0 unless ref $self; - return $self->{flags} & 2 unless $r; + return ($self->{flags} & 2) ? 1 : 0 unless defined $r; $self->{flags} = (($self->{flags} & ~2) | ($r ? 2 : 0)); - return $r; + return $r ? 1 : 0; } sub conf @@ -99,9 +134,15 @@ sub conf my $self = shift; my $r = shift; return $self ? 1 : 0 unless ref $self; - return $self->{flags} & 1 unless $r; + return ($self->{flags} & 1) ? 1 : 0 unless defined $r; $self->{flags} = (($self->{flags} & ~1) | ($r ? 1 : 0)); - return $r; + return $r ? 1 : 0; +} + +sub parents +{ + my $self = shift; + return @{$self->{parent}}; } # @@ -120,6 +161,7 @@ sub config my $self = shift; my $nodes_only = shift; my $level = shift; + my $seen = shift; my @out; my $line; my $call = $self->user_call; @@ -133,6 +175,16 @@ sub config if ($printit) { $line = ' ' x ($level*2) . "$call"; $call = ' ' x length $call; + + # recursion detector + if ((DXChannel->get($self->{call}) && $level > 1) || grep $self->{call} eq $_, @$seen) { + $line .= ' ...'; + push @out, $line; + return @out; + } + push @$seen, $self->{call}; + + # print users unless ($nodes_only) { if (@{$self->{users}}) { $line .= '->'; @@ -149,7 +201,7 @@ sub config } else { $line =~ s/\s+$//; push @out, $line; - $line = ' ' x ($level*2) . "$call->"; + $line = ' ' x ($level*2) . "$call->$c "; } } } @@ -159,12 +211,14 @@ sub config push @out, $line if length $line; } + # deal with more nodes foreach my $ncall (sort @{$self->{nodes}}) { my $nref = Route::Node::get($ncall); if ($nref) { my $c = $nref->user_call; - push @out, $nref->config($nodes_only, $level+1, @_); +# dbg("recursing from $call -> $c") if isdbg('routec'); + push @out, $nref->config($nodes_only, $level+1, $seen, @_); } else { push @out, ' ' x (($level+1)*2) . "$ncall?" if @_ == 0 || (@_ && grep $ncall =~ m|$_|, @_); } @@ -173,10 +227,76 @@ sub config return @out; } +sub cluster +{ + my $nodes = Route::Node::count(); + my $tot = Route::User::count(); + my $users = scalar DXCommandmode::get_all(); + my $maxusers = Route::User::max(); + my $uptime = main::uptime(); + + return " $nodes nodes, $users local / $tot total users Max users $maxusers Uptime $uptime"; +} + # # routing things # +sub get +{ + my $call = shift; + return Route::Node::get($call) || Route::User::get($call); +} + +# find all the possible dxchannels which this object might be on +sub alldxchan +{ + my $self = shift; + my @dxchan; +# dbg("Trying node $self->{call}") if isdbg('routech'); + my $dxchan = DXChannel->get($self->{call}); + push @dxchan, $dxchan if $dxchan; + + # it isn't, build up a list of dxchannels and possible ping times + # for all the candidates. + unless (@dxchan) { + foreach my $p (@{$self->{parent}}) { +# dbg("Trying parent $p") if isdbg('routech'); + next if $p eq $main::mycall; # the root + my $dxchan = DXChannel->get($p); + if ($dxchan) { + push @dxchan, $dxchan unless grep $dxchan == $_, @dxchan; + } else { + next if grep $p eq $_, @_; + my $ref = Route::Node::get($p); +# dbg("Next node $p " . ($ref ? 'Found' : 'NOT Found') if isdbg('routech') ); + push @dxchan, $ref->alldxchan($self->{call}, @_) if $ref; + } + } + } +# dbg('routech', "Got dxchan: " . join(',', (map{ $_->call } @dxchan)) ); + return @dxchan; +} + +sub dxchan +{ + my $self = shift; + my @dxchan = $self->alldxchan; + return undef unless @dxchan; + + # determine the minimum ping channel + my $minping = 99999999; + my $dxchan; + foreach my $dxc (@dxchan) { + my $p = $dxc->pingave; + if (defined $p && $p < $minping) { + $minping = $p; + $dxchan = $dxc; + } + } + $dxchan = shift @dxchan unless $dxchan; + return $dxchan; +} # # track destruction @@ -187,7 +307,7 @@ sub DESTROY my $self = shift; my $pkg = ref $self; - dbg('routelow', "$pkg $self->{call} destroyed"); + dbg("$pkg $self->{call} destroyed") if isdbg('routelow'); } no strict; diff --git a/perl/Route/Node.pm b/perl/Route/Node.pm index 9e1f3c04..e29fe3ca 100644 --- a/perl/Route/Node.pm +++ b/perl/Route/Node.pm @@ -14,22 +14,24 @@ use Route::User; use strict; -use vars qw(%list %valid @ISA $max); +use vars qw(%list %valid @ISA $max $filterdef); @ISA = qw(Route); %valid = ( parent => '0,Parent Calls,parray', nodes => '0,Nodes,parray', users => '0,Users,parray', + usercount => '0,User Count', version => '0,Version', ); +$filterdef = $Route::filterdef; %list = (); $max = 0; sub count { - my $n = scalar %list; + my $n = scalar (keys %list); $max = $n if $n > $max; return $n; } @@ -55,9 +57,11 @@ sub add { my $parent = shift; my $call = uc shift; + confess "Route::add trying to add $call to myself" if $call eq $parent->{call}; my $self = get($call); if ($self) { $self->_addparent($parent->{call}); + $parent->_addnode($call); return undef; } $parent->_addnode($call); @@ -79,19 +83,35 @@ sub del # delete parent from this call's parent list my $pcall = $pref->{call}; + my $ncall = $self->{call}; + $pref->_delnode($ncall);; my $ref = $self->_delparent($pcall); my @nodes; - # is this the last connection? - $self->_del_users; + # is this the last connection, I have no parents anymore? unless (@$ref) { - push @nodes, $self->del_nodes; + foreach my $rcall (@{$self->{nodes}}) { + next if grep $rcall eq $_, @_; + my $r = Route::Node::get($rcall); + push @nodes, $r->del($self, $ncall, @_) if $r; + } + $self->_del_users; delete $list{$self->{call}}; + push @nodes, $self; } - push @nodes, $self; return @nodes; } +sub del_nodes +{ + my $parent = shift; + my @out; + foreach my $rcall (@{$parent->{nodes}}) { + my $r = get($rcall); + push @out, $r->del($parent, $parent->{call}, @_) if $r; + } + return @out; +} sub _del_users { @@ -103,28 +123,25 @@ sub _del_users $self->{users} = []; } -# remove all sub nodes from this parent -sub del_nodes -{ - my $self = shift; - my @nodes; - - for (@{$self->{nodes}}) { - next if $self->{call} eq $_; - push @nodes, $self->del_node($_); - } - return @nodes; -} - # add a user to this node sub add_user { my $self = shift; my $ucall = shift; + + confess "Trying to add NULL User call to routing tables" unless $ucall; + $self->_adduser($ucall); - + + $self->{usercount} = scalar @{$self->{users}}; my $uref = Route::User::get($ucall); - return $uref ? () : (Route::User->new($ucall, $self->{call}, @_)); + my @out; + if ($uref) { + $uref->addparent($self->{call}); + } else { + @out = Route::User->new($ucall, $self->{call}, @_); + } + return @out; } # delete a user from this node @@ -134,21 +151,45 @@ sub del_user my $ucall = shift; my $ref = Route::User::get($ucall); $self->_deluser($ucall); - return ($ref->del($self)) if $ref; - return (); + my @out = $ref->del($self) if $ref; + return @out; } -# delete a node from this node (ie I am a parent) -sub del_node +sub usercount { my $self = shift; - my $ncall = shift; - $self->_delnode($ncall); - my $ref = get($ncall); - return ($ref->del($self)) if $ref; - return (); + if (@_ && @{$self->{users}} == 0) { + $self->{usercount} = shift; + } + return $self->{usercount}; +} + +sub users +{ + my $self = shift; + return @{$self->{users}}; +} + +sub nodes +{ + my $self = shift; + return @{$self->{nodes}}; } +sub rnodes +{ + my $self = shift; + my @out; + foreach my $call (@{$self->{nodes}}) { + next if grep $call eq $_, @_; + push @out, $call; + my $r = get($call); + push @out, $r->rnodes($call, @_) if $r; + } + return @out; +} + + sub new { my $pkg = shift; @@ -172,7 +213,14 @@ sub get { my $call = shift; $call = shift if ref $call; - return $list{uc $call}; + my $ref = $list{uc $call}; + dbg("Failed to get Node $call" ) if !$ref && isdbg('routerr'); + return $ref; +} + +sub get_all +{ + return values %list; } sub _addparent @@ -219,7 +267,7 @@ sub DESTROY my $pkg = ref $self; my $call = $self->{call} || "Unknown"; - dbg('route', "destroying $pkg with $call"); + dbg("destroying $pkg with $call") if isdbg('routelow'); } # diff --git a/perl/Route/User.pm b/perl/Route/User.pm index 4e3e59cf..d492c27b 100644 --- a/perl/Route/User.pm +++ b/perl/Route/User.pm @@ -13,19 +13,20 @@ use Route; use strict; -use vars qw(%list %valid @ISA $max); +use vars qw(%list %valid @ISA $max $filterdef); @ISA = qw(Route); %valid = ( parent => '0,Parent Calls,parray', ); +$filterdef = $Route::filterdef; %list = (); $max = 0; sub count { - my $n = scalar %list; + my $n = scalar(keys %list); $max = $n if $n > $max; return $n; } @@ -57,15 +58,17 @@ sub del my $pref = shift; my $ref = $self->delparent($pref->{call}); return () if @$ref; - delete $list{$self->{call}}; - return ($ref); + my @out = delete $list{$self->{call}}; + return @out; } sub get { my $call = shift; $call = shift if ref $call; - return $list{uc $call}; + my $ref = $list{uc $call}; + dbg("Failed to get User $call" ) if !$ref && isdbg('routerr'); + return $ref; } sub addparent diff --git a/perl/Spot.pm b/perl/Spot.pm index 8b66b0f6..074ae740 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -16,11 +16,13 @@ use DXLog; use Julian; use Prefix; use DXDupe; +use Data::Dumper; use strict; -use vars qw($fp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef); +use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef); $fp = undef; +$statp = undef; $maxspots = 50; # maximum spots to return $defaultspots = 10; # normal number of spots to return $maxdays = 100; # normal maximum no of days to go back @@ -88,6 +90,7 @@ sub init { mkdir "$dirprefix", 0777 if !-e "$dirprefix"; $fp = DXLog::new($dirprefix, "dat", 'd'); + $statp = DXLog::new($dirprefix, "bys", 'd'); } sub prefix @@ -183,7 +186,7 @@ sub search $expr =~ s/\$f(\d)/\$ref->[$1]/g; # swap the letter n for the correct field name # $expr =~ s/\$f(\d)/\$spots[$1]/g; # swap the letter n for the correct field name - dbg("search", "hint='$hint', expr='$expr', spotno=$from-$to, day=$dayfrom-$dayto\n"); + dbg("hint='$hint', expr='$expr', spotno=$from-$to, day=$dayfrom-$dayto\n") if isdbg('search'); # build up eval to execute $eval = qq( @@ -313,6 +316,87 @@ sub listdups { return DXDupe::listdups('X', $dupage, @_); } + +sub genstats +{ + my @date = @_; + my $in = $fp->open(@date); + my $out = $statp->open(@date, 'w'); + my @freq = ( + [0, Bands::get_freq('160m')], + [1, Bands::get_freq('80m')], + [2, Bands::get_freq('40m')], + [3, Bands::get_freq('30m')], + [4, Bands::get_freq('20m')], + [5, Bands::get_freq('17m')], + [6, Bands::get_freq('15m')], + [7, Bands::get_freq('12m')], + [8, Bands::get_freq('10m')], + [9, Bands::get_freq('6m')], + [10, Bands::get_freq('4m')], + [11, Bands::get_freq('2m')], + [12, Bands::get_freq('70cm')], + [13, Bands::get_freq('13cm')], + [14, Bands::get_freq('9cm')], + [15, Bands::get_freq('6cm')], + [16, Bands::get_freq('3cm')], + [17, Bands::get_freq('12mm')], + [18, Bands::get_freq('6cm')], + ); + my %list; + my @tot; + + if ($in && $out) { + while (<$in>) { + chomp; + my ($freq, $by, $dxcc) = (split /\^/)[0,4,6]; + my $ref = $list{$by} || [0, $dxcc]; + for (@freq) { + if ($freq >= $_->[1] && $freq <= $_->[2]) { + $$ref[$_->[0]+2]++; + $tot[$_->[0]+2]++; + $$ref[0]++; + $tot[0]++; + $list{$by} = $ref; + last; + } + } + } + + my $i; + for ($i = 0; $i < @freq+2; $i++) { + $tot[$i] ||= 0; + } + $out->write(join('^', 'TOTALS', @tot) . "\n"); + + for (sort {$list{$b}->[0] <=> $list{$a}->[0]} keys %list) { + my $ref = $list{$_}; + my $call = $_; + for ($i = 0; $i < @freq+2; ++$i) { + $ref->[$i] ||= 0; + } + $out->write(join('^', $call, @$ref) . "\n"); + } + $out->close; + } +} + +# return true if the stat file is newer than than the spot file +sub checkstats +{ + my @date = @_; + my $in = $fp->mtime(@date); + my $out = $statp->mtime(@date); + return defined $out && defined $in && $out >= $in; +} + +# daily processing +sub daily +{ + my @date = Julian::unixtoj($main::systime); + @date = Julian::sub(@date, 1); + genstats(@date) unless checkstats(@date); +} 1; diff --git a/perl/Timer.pm b/perl/Timer.pm index 281421f0..683497d2 100644 --- a/perl/Timer.pm +++ b/perl/Timer.pm @@ -25,7 +25,7 @@ sub new $self->{interval} = $time if $recur; push @timerchain, $self; $notimers++; - dbg('connll', "Timer created ($notimers)"); + dbg("Timer created ($notimers)") if isdbg('connll'); return $self; } @@ -52,7 +52,7 @@ sub handler sub DESTROY { - dbg('connll', "timer destroyed ($Timer::notimers)"); + dbg("timer destroyed ($Timer::notimers)") if isdbg('connll'); $Timer::notimers--; } 1; diff --git a/perl/cluster.pl b/perl/cluster.pl index 35881d45..572be7a9 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -61,7 +61,6 @@ use DXProtVars; use DXProtout; use DXProt; use DXMsg; -use DXCluster; use DXCron; use DXConnect; use DXBearing; @@ -115,7 +114,7 @@ sub already_conn my ($conn, $call, $mess) = @_; $conn->disable_read(1); - dbg('chan', "-> D $call $mess\n"); + dbg("-> D $call $mess\n") if isdbg('chan'); $conn->send_now("D$call|$mess"); sleep(2); $conn->disconnect; @@ -145,24 +144,9 @@ sub new_channel return; } - # is there one already connected elsewhere in the cluster? if ($user) { - if (($user->is_node || $call eq $myalias) && !DXCluster->get_exact($call)) { - ; - } else { - if (my $ref = DXCluster->get_exact($call)) { - my $mess = DXM::msg($lang, 'concluster', $call, $ref->mynode->dxchancall); - already_conn($conn, $call, $mess); - return; - } - } $user->{lang} = $main::lang if !$user->{lang}; # to autoupdate old systems } else { - if (my $ref = DXCluster->get_exact($call)) { - my $mess = DXM::msg($lang, 'concluster', $call, $ref->mynode->dxchancall); - already_conn($conn, $call, $mess); - return; - } $user = DXUser->new($call); } @@ -221,7 +205,7 @@ sub cease eval { Local::finish(); # end local processing }; - dbg('local', "Local::finish error $@") if $@; + dbg("Local::finish error $@") if $@; # disconnect nodes foreach $dxchan (DXChannel->get_all_nodes) { @@ -250,7 +234,7 @@ sub cease $l->close_server; } - dbg('chan', "DXSpider version $version, build $build ended"); + dbg("DXSpider version $version, build $build ended") if isdbg('chan'); Log('cluster', "DXSpider V$version, build $build ended"); dbgclose(); Logclose(); @@ -264,11 +248,11 @@ sub reap { my $cpid; while (($cpid = waitpid(-1, WNOHANG)) > 0) { - dbg('reap', "cpid: $cpid"); + dbg("cpid: $cpid") if isdbg('reap'); # Msg->pid_gone($cpid); $zombies-- if $zombies > 0; } - dbg('reap', "cpid: $cpid"); + dbg("cpid: $cpid") if isdbg('reap'); } # this is where the input queue is dealt with and things are dispatched off to other parts of @@ -285,7 +269,7 @@ sub process_inqueue return unless defined $sort; # do the really sexy console interface bit! (Who is going to do the TK interface then?) - dbg('chan', "<- $sort $call $line\n") unless $sort eq 'D'; + dbg("<- $sort $call $line\n") if $sort ne 'D' && isdbg('chan'); # handle A records my $user = $dxchan->user; @@ -300,6 +284,8 @@ sub process_inqueue $dxchan->disconnect; } elsif ($sort eq 'D') { ; # ignored (an echo) + } elsif ($sort eq 'G') { + $dxchan->enhanced($line); } else { print STDERR atime, " Unknown command letter ($sort) received from $call\n"; } @@ -331,7 +317,7 @@ $starttime = $systime = time; $lang = 'en' unless $lang; # open the debug file, set various FHs to be unbuffered -dbginit(); +dbginit(\&DXCommandmode::broadcast_debug); foreach (@debug) { dbgadd($_); } @@ -347,51 +333,55 @@ while () { push @fn, $1; } close CL; +my $subbuild; foreach my $fn (@fn) { $fn =~ s|::|/|g; open(CL, "$main::root/perl/${fn}.pm") or next; while () { - if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)/ ) { + if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)\.?(\d+.\d+)?/ ) { $build += $1; + $subbuild += $2 if $2; last; } } close CL; } +$build = "$build.$subbuild" if $subbuild; Log('cluster', "DXSpider V$version, build $build started"); # banner -dbg('err', "DXSpider Version $version, build $build started", "Copyright (c) 1998-2001 Dirk Koopman G1TLH"); +dbg("Copyright (c) 1998-2001 Dirk Koopman G1TLH"); +dbg("DXSpider Version $version, build $build started"); # load Prefixes -dbg('err', "loading prefixes ..."); +dbg("loading prefixes ..."); Prefix::load(); # load band data -dbg('err', "loading band data ..."); +dbg("loading band data ..."); Bands::load(); # initialise User file system -dbg('err', "loading user file system ..."); +dbg("loading user file system ..."); DXUser->init($userfn, 1); # start listening for incoming messages/connects -dbg('err', "starting listeners ..."); +dbg("starting listeners ..."); my $conn = IntMsg->new_server($clusteraddr, $clusterport, \&login); $conn->conns("Server $clusteraddr/$clusterport"); push @listeners, $conn; -dbg('err', "Internal port: $clusteraddr $clusterport"); +dbg("Internal port: $clusteraddr $clusterport"); foreach my $l (@main::listen) { $conn = ExtMsg->new_server($l->[0], $l->[1], \&login); $conn->conns("Server $l->[0]/$l->[1]"); push @listeners, $conn; - dbg('err', "External Port: $l->[0] $l->[1]"); + dbg("External Port: $l->[0] $l->[1]"); } AGWrestart(); # load bad words -dbg('err', "load badwords: " . (BadWords::load or "Ok")); +dbg("load badwords: " . (BadWords::load or "Ok")); # prime some signals unless ($DB::VERSION) { @@ -402,15 +392,15 @@ unless ($is_win) { $SIG{HUP} = 'IGNORE'; $SIG{CHLD} = sub { $zombies++ }; - $SIG{PIPE} = sub { dbg('err', "Broken PIPE signal received"); }; - $SIG{IO} = sub { dbg('err', "SIGIO received"); }; + $SIG{PIPE} = sub { dbg("Broken PIPE signal received"); }; + $SIG{IO} = sub { dbg("SIGIO received"); }; $SIG{WINCH} = $SIG{STOP} = $SIG{CONT} = 'IGNORE'; $SIG{KILL} = 'DEFAULT'; # as if it matters.... # catch the rest with a hopeful message for (keys %SIG) { if (!$SIG{$_}) { - # dbg('chan', "Catching SIG $_"); + # dbg("Catching SIG $_") if isdbg('chan'); $SIG{$_} = sub { my $sig = shift; DXDebug::confess("Caught signal $sig"); }; } } @@ -433,38 +423,43 @@ WCY->init(); Spot->init(); # initialise the protocol engine -dbg('err', "reading in duplicate spot and WWV info ..."); +dbg("reading in duplicate spot and WWV info ..."); DXProt->init(); # put in a DXCluster node for us here so we can add users and take them away -DXNode->new($DXProt::me, $mycall, 0, 1, $DXProt::myprot_version); -$routeroot = Route::Node->new($mycall, $version, Route::here($DXProt::me->here)|Route::conf($DXProt::me->confmode)); +$routeroot = Route::Node->new($mycall, $version*100+5300, Route::here($DXProt::me->here)|Route::conf($DXProt::me->conf)); + +# make sure that there is a routing OUTPUT node default file +#unless (Filter::read_in('route', 'node_default', 0)) { +# my $dxcc = $DXProt::me->dxcc; +# $Route::filterdef->cmd($DXProt::me, 'route', 'accept', "node_default call $mycall" ); +#} # read in any existing message headers and clean out old crap -dbg('err', "reading existing message headers ..."); +dbg("reading existing message headers ..."); DXMsg->init(); DXMsg::clean_old(); # read in any cron jobs -dbg('err', "reading cron jobs ..."); +dbg("reading cron jobs ..."); DXCron->init(); # read in database descriptors -dbg('err', "reading database descriptors ..."); +dbg("reading database descriptors ..."); DXDb::load(); # starting local stuff -dbg('err', "doing local initialisation ..."); +dbg("doing local initialisation ..."); eval { Local::init(); }; -dbg('local', "Local::init error $@") if $@; +dbg("Local::init error $@") if $@; # print various flags -#dbg('err', "seful info - \$^D: $^D \$^W: $^W \$^S: $^S \$^P: $^P"); +#dbg("seful info - \$^D: $^D \$^W: $^W \$^S: $^S \$^P: $^P"); # this, such as it is, is the main loop! -dbg('err', "orft we jolly well go ..."); +dbg("orft we jolly well go ..."); #open(DB::OUT, "|tee /tmp/aa"); @@ -493,7 +488,7 @@ for (;;) { eval { Local::process(); # do any localised processing }; - dbg('local', "Local::process error $@") if $@; + dbg("Local::process error $@") if $@; } if ($decease) { last if --$decease <= 0; diff --git a/perl/connect.pl b/perl/connect.pl index fc6110a8..6ccee4b9 100755 --- a/perl/connect.pl +++ b/perl/connect.pl @@ -87,7 +87,7 @@ for (@in) { sub doconnect { my ($sort, $line) = @_; - dbg('connect', "CONNECT sort: $sort command: $line"); + dbg("CONNECT sort: $sort command: $line") if isdbg('connect'); if ($sort eq 'net') { # this is a straight network connect my ($host) = $line =~ /host\s+(\w+)/o; @@ -100,7 +100,7 @@ sub doconnect } elsif ($sort eq 'ax25') { my @args = split /\s+/, $line; $pid = open2(\*R, \*W, "$line") or die "can't do $line $!"; - dbg('connect', "got pid $pid"); + dbg("got pid $pid") if isdbg('connect'); W->autoflush(1); } else { die "can't get here"; @@ -111,21 +111,21 @@ sub doconnect sub doabort { my $string = shift; - dbg('connect', "abort $string"); + dbg("abort $string") if isdbg('connect'); $abort = $string; } sub dotimeout { my $val = shift; - dbg('connect', "timeout set to $val"); + dbg("timeout set to $val") if isdbg('connect'); alarm($timeout = $val); } sub dochat { my ($expect, $send) = @_; - dbg('connect', "CHAT \"$expect\" -> \"$send\""); + dbg("CHAT \"$expect\" -> \"$send\"") if isdbg('connect'); my $line; alarm($timeout); @@ -139,9 +139,9 @@ sub dochat $line = ; $line =~ s/\r//og; } - dbg('connect', "received \"$line\""); + dbg("received \"$line\"") if isdbg('connect'); if ($abort && $line =~ /$abort/i) { - dbg('connect', "aborted on /$abort/"); + dbg("aborted on /$abort/") if isdbg('connect'); exit(11); } } @@ -152,18 +152,18 @@ sub dochat local $\ = "\r"; W->print("$send\r"); } - dbg('connect', "sent \"$send\""); + dbg("sent \"$send\"") if isdbg('connect'); } } sub doclient { my ($cl, $args) = @_; - dbg('connect', "client: $cl args: $args"); + dbg("client: $cl args: $args") if isdbg('connect'); my @args = split /\s+/, $args; # if (!defined ($pid = fork())) { -# dbg('connect', "can't fork"); +# dbg("can't fork") if isdbg('connect'); # exit(13); # } # if ($pid) { @@ -182,7 +182,7 @@ sub doclient open STDOUT, ">&W"; exec $cl, @args; } else { - dbg('connect', "client can't get here"); + dbg("client can't get here") if isdbg('connect'); exit(13); } # } @@ -190,13 +190,13 @@ sub doclient sub timeout { - dbg('connect', "timed out after $timeout seconds"); + dbg("timed out after $timeout seconds") if isdbg('connect'); exit(10); } sub term { - dbg('connect', "caught INT or TERM signal"); + dbg("caught INT or TERM signal") if isdbg('connect'); kill $pid if $pid; sleep(2); exit(12); @@ -205,5 +205,5 @@ sub term sub reap { my $wpid = wait; - dbg('connect', "pid $wpid has died"); + dbg("pid $wpid has died") if isdbg('connect'); } diff --git a/sgml/adminmanual.sgml b/sgml/adminmanual.sgml index 93314fee..cc6ba498 100644 --- a/sgml/adminmanual.sgml +++ b/sgml/adminmanual.sgml @@ -4,9 +4,9 @@ -The DXSpider Administration Manual v1.47 +The DXSpider Administration Manual v1.48 Ian Maude, G0VGS, (ianmaude@btinternet.com) -Version 1.47 April 2001 revision 1.0 +Version 1.48 August 2001 revision 1.1 A reference for SysOps of the DXSpider DXCluster program. @@ -17,353 +17,129 @@ A reference for SysOps of the DXSpider DXCluster program. -Hop control +Routing and Filtering -

-Starting with version 1.13 there is simple hop control available on a per -node basis. Also it is possible to isolate a network completely so that you -get all the benefits of being on that network, but can't pass on information -from it to any other networks you may be connected to (or vice versa). - -Basic hop control - -

-In /spider/data you will find a file called hop_table.pl. This is the file -that controls your hop count settings. It has a set of default hops on the -various PC frames and also a set for each node you want to alter the hops for. -You may be happy with the default settings of course, but this powerful tool -can help to protect and improve the network. The file will look something -like this ... - - -# -# hop table construction -# - -package DXProt; - -# default hopcount to use -$def_hopcount = 5; - -# some variable hop counts based on message type -%hopcount = -( - 11 => 10, - 16 => 10, - 17 => 10, - 19 => 10, - 21 => 10, -); - - -# the per node hop control thingy - - -%nodehops = - - GB7ADX => { 11 => 8, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, - - GB7UDX => { 11 => 8, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, - GB7BAA => { - 11 => 5, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, -}; - - -

-Each set of hops is contained within a pair of curly braces and contains a -series of PC frame types. PC11 for example is a DX spot. The figures here -are not exhaustive but should give you a good idea of how the file works. - -

-You can alter this file at any time, including whilst the cluster is running. -If you alter the file during runtime, the command load/hops will -bring your changes into effect. - -Isolating networks - -

-It is possible to isolate networks from each other on a "gateway" node using the - set/isolate <node_call> command. - -

-The effect of this is to partition an isolated network completely from another -nodes connected to your node. Your node will appear on and otherwise behave -normally on every network to which you are connected, but data from an isolated -network will not cross onto any other network or vice versa. However all the -spot, announce and WWV traffic and personal messages will still be handled -locally (because you are a real node on all connected networks), that is locally -connected users will appear on all networks and will be able to access and -receive information from all networks transparently. All routed messages will -be sent as normal, so if a user on one network knows that you are a gateway for -another network, he can still still send a talk/announce etc message via your -node and it will be routed across. +Introduction

-The only limitation currently is that non-private messages cannot be passed down -isolated links regardless of whether they are generated locally. This will change -when the bulletin routing facility is added. +From DXSpider version 1.48, major changes were introduced to the way +node connections are treated. This is part of an ongoing process to +remove problems with loops and to enable talk and other functions to +propagate across the whole of the worldwide cluster network. In fact, +in a Spider network, it would be useful, perhaps even necessary to +have loops. This would give real resilience to the network, meaning +that if a link dropped, the information flow would simply come in and +go out via a different route. Of course, we do not have a complete +network of Spider nodes, there are other programs out there. Some of +these do not have any protection from loops. Certainly AK1A does not +handle loops well at all. It is therefore necessary to have some form +of protection for these nodes.

-If you use isolate on a node connection you will continue to receive all -information from the isolated partner, however you will not pass any information -back to the isolated node. There are times when you would like to forward only -spots across a link (maybe during a contest for example). To do this, isolate -the node in the normal way and put in a filter in the /spider/filter/spots -directory to override the isolate. This filter can be very simple and consists -of just one line .... +This is achieved by using filtering on a route basis. There is a +default setting to help to protect the network, especially useful for new +and inexperienced SysOps. The idea is simple. When Spider is started +for the first time and a connection is made to or from another node, +the default is to only send the nodes you already have that are in your +own zone. For example, in the UK the default setting would be to send +only UK nodes to any connection. This can be filtered further (down to +a single node if needed) or expanded as required. - -$in = [ - [ 1, 0, 'd', 0, 3] # The last figure (3) is the hop count -]; - - -

-There is a lot more on filtering in the next section. -Filtering (Old Style upto v1.44) +Route Filters

-Filters can be set for spots, announcements and WWV. You will find the -directories for these under /spider/filter. You will find some examples in -the directories with the suffix .issue. There are two types of -filter, one for incoming information and one for outgoing information. -Outgoing filters are in the form CALLSIGN.pl and incoming filters -are in the form in_CALLSIGN.pl. Filters can be set for both nodes -and users. +As mentioned in the introduction, a default setting exists. If this is +all you want to use then that is fine, you have nothing else to do. +However, if you want to make any alterations then you need to know +a bit about filters.

-All filters work in basically the same way. There are several elements -delimited by commas. There can be many lines in the filter and they are -read from the top by the program. When writing a filter you need to think -carefully about just what you want to achieve. You are either going to write -a filter to accept or to reject. Think of a filter as -having 2 main elements. For a reject filter, you would have a line or multiple -lines rejecting the things you do not wish to receive and then a default line -accepting everything else that is not included in the filter. Likewise, for an -accept filter, you would have a line or multiple lines accepting the things you -wish to receive and a default line rejecting everthing else. +It is possible to reset the default setting for node connections should +you wish to do so, however this can be dangerous to the network unless +you have some experience in how all this works.... be careful! It is +also possible to change settings for one connection only. You can, +therefore, have many different filters set dependent on the amount of +node links you have.

-In the example below, a user requires a filter that would only return SSB spots -posted in Europe on the HF bands. This is achieved by first rejecting the CW -section of each HF band and rejecting all of VHF, UHF etc based on frequency. -Secondly, a filter rule is set based on CQ zones to only accept spots posted in -Europe. Lastly, a default filter rule is set to reject anything outside the filter. +I should at this stage give a little bit of background on filters. All +the filters in Spider work in basically the same way. You can either +accept or reject various options in order to create the filter rules +you wish to achieve. Some filters are user settable, others can only +be altered by the sysop. Route filtering can only be done by the sysop. - -$in = [ - [ 0, 0, 'r', # reject all CW spots - [ - 1800.0, 1850.0, - 3500.0, 3600.0, - 7000.0, 7040.0, - 14000.0, 14100.0, - 18068.0, 18110.0, - 21000.0, 21150.0, - 24890.0, 24930.0, - 28000.0, 28180.0, - 30000.0, 49000000000.0, - ] ,1 ], - [ 1, 11, 'n', [ 14, 15, 16, 20, 33, ], 15 ], #accept EU - [ 0, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else -]; - +The default_node filter

-The actual elements of each filter are described more fully in the following -sections. - -Spots - -

-The elements of the Spot filter are .... +As discussed previously, a default setting exists that only sends nodes +from your own zone. This can be overridden by using the default_node +filter option like this ... -[action, field_no, sort, possible_values, hops] - +reject/route default_node <filter_option> -

-There are 3 elements here to look at. Firstly, the action element. This is -very simple and only 2 possible states exist, accept (1) or drop (0). - -

-The second element is the field_no. There are 13 possiblities to choose from -here .... +or - - 0 = frequency - 1 = call - 2 = date in unix format - 3 = comment - 4 = spotter - 5 = spotted dxcc country - 6 = spotter's dxcc country - 7 = origin - 8 = spotted itu - 9 = spotted cq - 10 = spotter's itu - 11 = spotter's cq - 12 = callsign of the channel on which the spot has appeared +accept/route default_node <filter_option>

-The third element tells us what to expect in the fourth element. There are -4 possibilities .... +where filter_option is one of the following ... - n - numeric list of numbers e.g. [ 1,2,3 ] - r - ranges of pairs of numbers e.g. between 2 and 4 or 10 to 17 - [ 2,4, 10,17 ] - a - an alphanumeric regex - d - the default rule +call <prefixes> +call_dxcc <numbers> +call_itu <numbers> +call_zone <numbers> +origin <prefixes> +origin_dxcc <numbers> +origin_itu <numbers> +origin_zone <numbers>

-The fifth element is simply the hops to set in this filter. This would only -be used if the filter was for a node of course and overrides the hop count in -hop_table.pl. - -

-So, let's look at an example spot filter. It does not matter in the example -who the filter is to be used for. So, what do we need in the filter? We need -to filter the spots the user/node requires and also set a default rule for -anything else outside the filter. Below is a simple filter that stops spots -arriving from outside Europe. - -$in = [ - [ 0, 4, 'a', '^(K|N|A|W|VE|VA|J)'], # 0 = drop, 'a' = alphanumeric - [ 1, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else - ]; - +Please be careful if you alter this setting, it will affect +ALL your links! -

-So the filter is wrapped in between a pair of square brackets. This tells -Spider to look in between these limits. Then each line is contained within -its own square brackets and ends with a comma. Lets look carefully at the first -line. The first element is 0 (drop). Therefore anything we put on this line -will not be accepted. The next element is 4. This means we are filtering by -the spotter. The third element is the letter "a" which tells the program to -expect an alphanumeric expression in the fourth element. The fourth element -is a list of letters separated by the pipe symbol. +General route filtering

-What this line does is tell the program to drop any spots posted by anyone in -the USA, Canada or Japan. +Exactly the same rules apply for general route filtering. You would +use either an accept filter or a reject filter like this ... -

-The second line is the default rule for anything else. The "d" tells us this -and the line simply reads... accept anything else. + +reject/route <node_call> <filter_option> -

-You can add as many lines as you need to complete the filter but if there are -several lines of the same type it is neater to enclose them all as one line. -An example of this is where specific bands are set. We could write this like -this .... +or - -[ 0,0,'r',[1800.0, 2000.0], 1], -[ 0,0,'r',[10100.0, 10150.0], 1], -[ 0,0,'r',[14000.0, 14350.0], 1], -[ 0,0,'r',[18000.0, 18200.0], 1], +accept/route <node_call> <filter_option>

-But the line below achieves the same thing and is more efficient .... +where filter_option is one of the following ... - [ 0, 0, 'r', - [ - 1800.0, 2000.0, # top band - 10100.0, 10150.0, # WARC - 14000.0, 14350.0, # 20m - 18000.0, 18200.0, # WARC - [ ,1 ], +call <prefixes> +call_dxcc <numbers> +call_itu <numbers> +call_zone <numbers> +origin <prefixes> +origin_dxcc <numbers> +origin_itu <numbers> +origin_zone <numbers> - -Announcements -

- - -# This is an example announce or filter allowing only West EU announces -# -# The element list is:- -# 0 - callsign of announcer -# 1 - destination * = all, = routed to the node -# 2 - text -# 3 - * - sysop, - special list eg 6MUK, ' ', normal announce -# 4 - origin -# 5 - 0 - announce, 1 - wx -# 6 - channel callsign (the interface from which this spot came) - -$in = [ - [ 1, 0, 'a', '^(P[ABCDE]|DK0WCY|G|M|2|EI|F|ON)' ], - [ 0, 0, 'd', 0 ] -]; - +Here are some examples of route filters ... -In this example, only the prefixes listed will be allowed. It is possible to -be quite specific. The Dutch prefix "P" is followed by several secondary -identifiers which are allowed. So, in the example, "PA" or "PE" would be ok -but not "PG". It is even possible to allow information from a single callsign. -In the example this is DK0WCY, to allow the posting of his Aurora Beacon. - -WWV - -

- -# This is an example WWV filter -# -# The element list is:- -# 0 - nominal unix date of spot (ie the day + hour:13) -# 1 - the hour -# 2 - SFI -# 3 - K -# 4 - I -# 5 - text -# 6 - spotter -# 7 - origin -# 8 - incoming interface callsign - -# this one doesn't filter, it just sets the hop count to 6 and is -# used mainly just to override any isolation from WWV coming from -# the internet. - -$in = [ - [ 1, 0, 'd', 0, 6 ] -]; - +rej/route gb7djk call_dxcc 61,38 (everything except UK+EIRE nodes) +rej/route all (equiv to [very] restricted mode) +acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes) +acc/route gb7djk call gb7djk (equiv to SET/ISOLATE) -

-It should be noted that the filter will start to be used only once a user/node -has logged out and back in again. -

-I am not going to spend any more time on these filters now as they will become -more "comprehensive" in the near future. - -Filtering (New Style v1.45 and later) - General filter rules

@@ -574,6 +350,116 @@ what happens is that the reject is executed first, any non hf/cw spot is passed to the accept line, which lets through everything else on HF. The next filter line lets through just VHF/UHF spots from EU. +Basic hop control + +

+In /spider/data you will find a file called hop_table.pl. This is the file +that controls your hop count settings. It has a set of default hops on the +various PC frames and also a set for each node you want to alter the hops for. +You may be happy with the default settings of course, but this powerful tool +can help to protect and improve the network. The file will look something +like this ... + + +# +# hop table construction +# + +package DXProt; + +# default hopcount to use +$def_hopcount = 5; + +# some variable hop counts based on message type +%hopcount = +( + 11 => 10, + 16 => 10, + 17 => 10, + 19 => 10, + 21 => 10, +); + + +# the per node hop control thingy + + +%nodehops = + + GB7ADX => { 11 => 8, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, + + GB7UDX => { 11 => 8, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, + GB7BAA => { + 11 => 5, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, +}; + + +

+Each set of hops is contained within a pair of curly braces and contains a +series of PC frame types. PC11 for example is a DX spot. The figures here +are not exhaustive but should give you a good idea of how the file works. + +

+You can alter this file at any time, including whilst the cluster is running. +If you alter the file during runtime, the command load/hops will +bring your changes into effect. + +Isolating networks + +

+It is possible to isolate networks from each other on a "gateway" node using the + set/isolate <node_call> command. + +

+The effect of this is to partition an isolated network completely from another +node connected to your node. Your node will appear on and otherwise behave +normally on every network to which you are connected, but data from an isolated +network will not cross onto any other network or vice versa. However all the +spot, announce and WWV traffic and personal messages will still be handled +locally (because you are a real node on all connected networks), that is locally +connected users will appear on all networks and will be able to access and +receive information from all networks transparently. All routed messages will +be sent as normal, so if a user on one network knows that you are a gateway for +another network, he can still still send a talk/announce etc message via your +node and it will be routed across. + +

+The only limitation currently is that non-private messages cannot be passed down +isolated links regardless of whether they are generated locally. This will change +when the bulletin routing facility is added. + +

+If you use isolate on a node connection you will continue to receive all +information from the isolated partner, however you will not pass any information +back to the isolated node. There are times when you would like to forward only +spots across a link (maybe during a contest for example). To do this, isolate +the node in the normal way and put in a filter in the /spider/filter/spots +directory to override the isolate. This filter can be very simple and consists +of just one line .... + + +$in = [ + [ 1, 0, 'd', 0, 3] # The last figure (3) is the hop count +]; + Other filters @@ -1509,6 +1395,50 @@ default for nodes and users eg:- accept/ann user_default by G,M,2 +accept/route (8) + +

+ +accept/route <call> [0-9] <pattern> Set an 'accept' filter line for routing + + +

+Create an 'accept this routing PC Protocol' line for a filter. + +

+An accept filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is passed thru that interface. See HELP FILTERING for more info. Please read this +to understand how filters work - it will save a lot of grief later on. + +

+You can use any of the following things in this line:- + + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + + +

+some examples:- + + + acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes) + acc/route gb7djk call gb7djk (equiv to SET/ISOLATE) + + +

+You can use the tag 'all' to accept everything eg: + + + acc/route all + + accept/spots (0)

@@ -1695,7 +1625,9 @@ default for nodes and users eg:-

Send an announcement to LOCAL users only, where <text> is the text -of the announcement you wish to broadcast +of the announcement you wish to broadcast. If you do not wish to receive +announces, use the set/noannounce command. Any announces made by +a sysop will override set/noannounce. announce full (0) @@ -2534,6 +2466,47 @@ default for nodes and users eg:- reject/ann user_default by G,M,2 +reject/route (8) + +

+ +reject/route <call> [0-9] <pattern> Set an 'reject' filter line for routing + + +

+Create an 'reject this routing PC Protocol' line for a filter. + +

+An reject filter line means that if a PC16/17/19/21/24/41/50 matches this filter +it is NOT passed thru that interface. See HELP FILTERING for more info. Please +read this to understand how filters work - it will save a lot of grief later on. +You can use any of the following things in this line:- + + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + + +

+some examples:- + + + rej/route gb7djk call_dxcc 61,38 (everything except UK+EIRE nodes) + + +

+You can use the tag 'all' to reject everything eg: + + + rej/route all (equiv to [very] restricted mode) + + reject/spots (0)

@@ -2884,6 +2857,13 @@ Use with extreme care. This command may well be superceded by FILTERing.

Add a beep to DX and other terminal messages. +set/bbs (5) + +

+ +set/bbs <call> [<call>..]Make <call> a BBS + + set/clx (5)

@@ -3975,6 +3955,24 @@ Only the fields that are defined (in perl term) will be displayed. This command shows the internal status of a message and includes information such as to whom it has been forwarded, its size, origin etc etc. +

+If no message number is given then the status of the message system is +displayed. + +stat/route_node (5) + +

+ +stat/route_node <callsign> Show the data in a Route::Node object + + +stat/route_user (5) + +

+ +stat/route_user <callsign> Show the data in a Route::User object + + stat/user (5)

diff --git a/sgml/installation.sgml b/sgml/installation.sgml index 2818cb06..280f4cdd 100644 --- a/sgml/installation.sgml +++ b/sgml/installation.sgml @@ -4,10 +4,10 @@ -The DXSpider Installation Manual v1.47 +The DXSpider Installation Manual v1.48 Iain Philipps, G0RDI (g0rdi@77hz.com) and Ian Maude, G0VGS, (ianmaude@btinternet.com) -Version 1.47, April 2001 revision 1.0 +Version 1.48, July 2001 revision 1.1 A reference for SysOps of the DXSpider DXCluster program. @@ -46,17 +46,67 @@ following modules from + + + + +

-Do get the latest versions of these packages and install them -but use the above list as the earliest versions usable. +Copy the CPAN modules listed above to a convenient place on your computer. One good place would be /usr/local/packages, and the instructions which follow will assume that that's where you have put them. + +

+Log in as 'root', and make sure you're at '/root' before you continue. Here are exactly the commands you must issue next: - + + +# tar xvfz /usr/local/packages/Data-Dumper-2.10.tar.gz +# cd Data-Dumper-2.10 +# perl Makefile.PL +# make test +# make install +# cd .. +# +# tar xvfz /usr/local/packages/TimeDate-1.10.tar.gz +# cd TimeDate-1.10 +# perl Makefile.PL +# make test +# make install +# cd .. +# +# tar xvfz /usr/local/packages/IO-1.20.tar.gz +# cd IO-1.20 +# perl Makefile.PL +# make test +# make install UNINST=1 +# cd .. +# +# tar xvfz /usr/local/packages/Net-Telnet-3.02.tar.gz +# cd Net-Telnet-3.02 +# perl Makefile.PL +# make test +# make install +# cd .. +# +# tar xvfz /usr/local/packages/Curses-1.05.tar.gz +# cd Curses-1.05 +# perl Makefile.PL +# make test +# make install +# cd .. +# +# tar xvfz /usr/local/packages/Time-HiRes-01.20.tar.gz +# cd Time-HiRes-01.20 +# perl Makefile.PL +# make test +# make install +# cd .. + + +

+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. + Preparation diff --git a/spider-web/spider.cgi b/spider-web/spider.cgi index b9b3a259..8f104ce9 100755 --- a/spider-web/spider.cgi +++ b/spider-web/spider.cgi @@ -1,79 +1,91 @@ -#! /bin/sh -# -################################################### -# -# Edit the following lines -# -# -portnumber=$"1407" -tempdir=$"/usr/local/httpd/spider/client/" -clustercall=$"PA4AB-15" -# -# -# -# End of configurable part -# -#################################################### -hostname=$"localhost" - -echo "Content-type: text/html" -echo -echo "" -echo "Spider DX Cluster" -echo "" -echo '' -echo "

"
-
-pattern=$(echo ${QUERY_STRING} | sed -e s,'call=',, | sed -e s/"&passwd="/" "/)
-call=$(echo $pattern | cut -d' ' -f1)
-passwd=$(echo $pattern | cut -s -d' ' -f2)
-
-
-if [ ${call} = ""]  ; then
-  echo "
" - echo "
" - echo "Welcome to the Spider DX Cluster" - echo "" - echo ${clustercall} - echo "" - echo "

 

" - echo '
' - echo "Your Call Please: " - echo ' ' - echo '' - echo "
" - echo "
" +#!/usr/bin/perl +# cluster-web.pl - perl login script for cluster web interface. +# @author Ian Norton +# - Based on clx-web by DL6DBH (ftp://clx.muc.de/pub/clx/clx-java_10130001.tgz) +# - Modified by PA4AB +# @version 0.1 beta. 20010610. + +# Work out the hostname of this server. +use Sys::Hostname; +my $HOSTNAME = hostname(); + +# Set the hostname manually here if the above fails. +# $HOSTNAME = "gb7mbc.spoo.org" ; +$PORT = "8000" ; + +# Send text/html header to the browser. +print "Content-type: text/html\n\n"; + +# Get the parameters passed to the script. +read (STDIN, $post_data, $ENV{CONTENT_LENGTH}); +@call = split (/=/, $post_data) ; + +# Print the page header. + +print <<'EOF'; + + + + + Cluster Web - DX Cluster Web Interface. + + + + + + + +

+
+ +
Cluster Web - DX Cluster Web Interface.

+EOF + + print("Welcome to $HOSTNAME
") ; + +print <<'EOF'; +
+
+

+ +
+ +
+EOF + +if($ENV{CONTENT_LENGTH} > 0) + { + # Callsign is set - print the whole stuff.... + # print("Callsign is $call[1]
\n") ; + + print("
\n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print(" \n") ; + print("
\n") ; + } else - echo "" > ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo "" >> ${tempfile}${call}.html - echo '' >> ${tempdir}${call}.html - echo '' >> ${tempdir}${call}.html - echo '' >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - echo "" >> ${tempdir}${call}.html - GOTO='' - echo ${GOTO} - -fi - echo "" - echo "" - -# all *.html tempory files remove older than 10 min -# -cd ${tempdir} -files=$(find *.html -mmin +10) -rm ${files} + { + # Callsign isn't set - print the login page. + print <<'EOF'; +
+ + Please enter your callsign:
+
+ + +
+EOF + } + +print <<'EOF'; +
+ +
+Spider Homepage. + + +EOF diff --git a/txt/adminmanual.txt b/txt/adminmanual.txt index cca9536b..0a9b21d6 100644 --- a/txt/adminmanual.txt +++ b/txt/adminmanual.txt @@ -1,6 +1,6 @@ - The DXSpider Administration Manual v1.47 + The DXSpider Administration Manual v1.48 Ian Maude, G0VGS, (ianmaude@btinternet.com) - Version 1.47 April 2001 revision 1.0 + Version 1.48 August 2001 revision 1.1 A reference for SysOps of the DXSpider DXCluster program. ______________________________________________________________________ @@ -64,648 +64,350 @@ - 1. Hop control + 1. Routing and Filtering - 1.1 Basic hop control - 1.2 Isolating networks + 1.1 Introduction + 1.2 Route Filters + 1.3 The default_node filter + 1.4 General route filtering + 1.5 General filter rules + 1.6 Types of filter + 1.7 Filter options + 1.8 Default filters + 1.9 Advanced filtering + 1.10 Basic hop control + 1.11 Isolating networks - 2. Filtering (Old Style upto v1.44) + 2. Other filters - 2.1 Spots - 2.2 Announcements - 2.3 WWV + 2.1 Filtering Mail + 2.2 Filtering DX callouts (Depricated) + 2.3 Filtering words from text fields in Announce, Talk and DX spots - 3. Filtering (New Style v1.45 and later) + 3. Mail - 3.1 General filter rules - 3.2 Types of filter - 3.3 Filter options - 3.4 Default filters - 3.5 Advanced filtering + 3.1 Personal mail + 3.2 Bulletin mail + 3.3 Forward.pl + 3.4 The msg command + 3.5 Message status + 3.6 Filtering mail + 3.7 Distribution lists + 3.8 BBS interface - 4. Other filters + 4. Databases - 4.1 Filtering Mail - 4.2 Filtering DX callouts (Depricated) - 4.3 Filtering words from text fields in Announce, Talk and DX spots + 4.1 Creating databases + 4.2 Importing databases + 4.3 Checking available databases + 4.4 Looking up databases + 4.5 Removing databases - 5. Mail + 5. Information, files and useful programs - 5.1 Personal mail - 5.2 Bulletin mail - 5.3 Forward.pl - 5.4 The msg command - 5.5 Message status - 5.6 Filtering mail - 5.7 Distribution lists - 5.8 BBS interface + 5.1 MOTD + 5.2 Downtime message + 5.3 Other text messages + 5.4 The Aliases file + 5.5 Console.pl + 5.6 Updating kepler data + 5.7 The QRZ callbook - 6. Databases + 6. CVS - 6.1 Creating databases - 6.2 Importing databases - 6.3 Checking available databases - 6.4 Looking up databases - 6.5 Removing databases + 7. The DXSpider command set - 7. Information, files and useful programs - - 7.1 MOTD - 7.2 Downtime message - 7.3 Other text messages - 7.4 The Aliases file - 7.5 Console.pl - 7.6 Updating kepler data - 7.7 The QRZ callbook - - 8. CVS - - 9. The DXSpider command set - - 9.1 accept/announce (0) - 9.2 accept/announce (extended for sysops) (8) - 9.3 accept/spots (0) - 9.4 accept/spots (extended for sysops) (8) - 9.5 accept/wcy (0) - 9.6 accept/wcy (extended for sysops) (8) - 9.7 accept/wwv (0) - 9.8 accept/wwv (extended for sysops) (8) - 9.9 announce (0) - 9.10 announce full (0) - 9.11 announce sysop (5) - 9.12 apropos (0) - 9.13 bye (0) - 9.14 catchup (5) - 9.15 clear/spots (0) - 9.16 connect (5) - 9.17 dbavail (0) - 9.18 dbcreate (9) - 9.19 dbimport (9) - 9.20 dbremove (9) - 9.21 dbshow (0) - 9.22 debug (9) - 9.23 directory (0) - 9.24 directory (extended for sysops) (5) - 9.25 disconnect (8) - 9.26 dx (0) - 9.27 export (9) - 9.28 export_users (9) - 9.29 forward/latlong (8) - 9.30 forward/opername (1) - 9.31 help (0) - 9.32 init (5) - 9.33 kill (0) - 9.34 kill (5) - 9.35 kill full (5) - 9.36 links (0) - 9.37 load/aliases (9) - 9.38 load/baddx (9) - 9.39 load/badmsg (9) - 9.40 load/badwords (9) - 9.41 load/bands (9) - 9.42 load/cmd_cache (9) - 9.43 load/forward (9) - 9.44 load/messages (9) - 9.45 load/prefixes (9) - 9.46 merge (5) - 9.47 msg (9) - 9.48 pc (8) - 9.49 ping (1) - 9.50 rcmd (1) - 9.51 read (0) - 9.52 read (extended for sysops) (5) - 9.53 reject/announce - 9.54 reject/announce (extended for sysops) (8) - 9.55 reject/spots (0) - 9.56 reject/spots (extended for sysops) (8) - 9.57 reject/wcy (0) - 9.58 reject/wcy (extended for sysops) (8) - 9.59 reject/wwv (0) - 9.60 reject/wwv (extended for sysops) (8) - 9.61 reply (0) - 9.62 send (0) - 9.63 set/address (0) - 9.64 set/announce (0) - 9.65 set/arcluster (5) - 9.66 set/baddx (8) - 9.67 set/badnode (6) - 9.68 set/badspotter (8) - 9.69 set/beep (0) - 9.70 set/clx (5) - 9.71 set/debug (9) - 9.72 set/dx (0) - 9.73 set/dxgrid (0) - 9.74 set/dxnet (5) - 9.75 set/echo (0) - 9.76 set/here (0) - 9.77 set/homenode (0) - 9.78 set/hops (8) - 9.79 set/isolate (9) - 9.80 set/language (0) - 9.81 set/location (0) - 9.82 set/sys_location (9) - 9.83 set/logininfo (0) - 9.84 set/lockout (9) - 9.85 set/name (0) - 9.86 set/node (9) - 9.87 set/obscount (9) - 9.88 set/page (0) - 9.89 set/password (9) - 9.90 set/pinginterval (9) - 9.91 set/privilege (9) - 9.92 set/spider (5) - 9.93 set/sys_qra (9) - 9.94 set/qra (0) - 9.95 set/qth (0) - 9.96 set/talk (0) - 9.97 set/wcy (0) - 9.98 set/wwv (0) - 9.99 set/wx (0) - 9.100 show/baddx (1) - 9.101 show/badnode (6) - 9.102 show/badspotter (1) - 9.103 show/configuration (0) - 9.104 show/configuration/node (0) - 9.105 show/connect (1) - 9.106 show/date (0) - 9.107 show/debug (9) - 9.108 show/dx (0) - 9.109 show/dxcc (0) - 9.110 show/files (0) - 9.111 show/filter (0) - 9.112 show/filter (extended for sysops) (5) - 9.113 show/hops (8) - 9.114 show/isolate (1) - 9.115 show/lockout (9) - 9.116 show/log (8) - 9.117 show/moon (0) - 9.118 show/muf (0) - 9.119 show/node (1) - 9.120 show/prefix (0) - 9.121 show/program (5) - 9.122 show/qra (0) - 9.123 show/qrz (0) - 9.124 show/route (0) - 9.125 show/satellite (0) - 9.126 show/sun (0) - 9.127 show/time (0) - 9.128 show/wcy (0) - 9.129 show/wwv (0) - 9.130 shutdown (5) - 9.131 spoof (9) - 9.132 stat/db (5) - 9.133 stat/channel (5) - 9.134 stat/msg (5) - 9.135 stat/user (5) - 9.136 sysop (0) - 9.137 talk (0) - 9.138 type (0) - 9.139 who (0) - 9.140 wx (0) - 9.141 wx (enhanced for sysops) (5) + 7.1 accept/announce (0) + 7.2 accept/announce (extended for sysops) (8) + 7.3 accept/route (8) + 7.4 accept/spots (0) + 7.5 accept/spots (extended for sysops) (8) + 7.6 accept/wcy (0) + 7.7 accept/wcy (extended for sysops) (8) + 7.8 accept/wwv (0) + 7.9 accept/wwv (extended for sysops) (8) + 7.10 announce (0) + 7.11 announce full (0) + 7.12 announce sysop (5) + 7.13 apropos (0) + 7.14 bye (0) + 7.15 catchup (5) + 7.16 clear/spots (0) + 7.17 connect (5) + 7.18 dbavail (0) + 7.19 dbcreate (9) + 7.20 dbimport (9) + 7.21 dbremove (9) + 7.22 dbshow (0) + 7.23 debug (9) + 7.24 directory (0) + 7.25 directory (extended for sysops) (5) + 7.26 disconnect (8) + 7.27 dx (0) + 7.28 export (9) + 7.29 export_users (9) + 7.30 forward/latlong (8) + 7.31 forward/opername (1) + 7.32 help (0) + 7.33 init (5) + 7.34 kill (0) + 7.35 kill (5) + 7.36 kill full (5) + 7.37 links (0) + 7.38 load/aliases (9) + 7.39 load/baddx (9) + 7.40 load/badmsg (9) + 7.41 load/badwords (9) + 7.42 load/bands (9) + 7.43 load/cmd_cache (9) + 7.44 load/forward (9) + 7.45 load/messages (9) + 7.46 load/prefixes (9) + 7.47 merge (5) + 7.48 msg (9) + 7.49 pc (8) + 7.50 ping (1) + 7.51 rcmd (1) + 7.52 read (0) + 7.53 read (extended for sysops) (5) + 7.54 reject/announce + 7.55 reject/announce (extended for sysops) (8) + 7.56 reject/route (8) + 7.57 reject/spots (0) + 7.58 reject/spots (extended for sysops) (8) + 7.59 reject/wcy (0) + 7.60 reject/wcy (extended for sysops) (8) + 7.61 reject/wwv (0) + 7.62 reject/wwv (extended for sysops) (8) + 7.63 reply (0) + 7.64 send (0) + 7.65 set/address (0) + 7.66 set/announce (0) + 7.67 set/arcluster (5) + 7.68 set/baddx (8) + 7.69 set/badnode (6) + 7.70 set/badspotter (8) + 7.71 set/beep (0) + 7.72 set/bbs (5) + 7.73 set/clx (5) + 7.74 set/debug (9) + 7.75 set/dx (0) + 7.76 set/dxgrid (0) + 7.77 set/dxnet (5) + 7.78 set/echo (0) + 7.79 set/here (0) + 7.80 set/homenode (0) + 7.81 set/hops (8) + 7.82 set/isolate (9) + 7.83 set/language (0) + 7.84 set/location (0) + 7.85 set/sys_location (9) + 7.86 set/logininfo (0) + 7.87 set/lockout (9) + 7.88 set/name (0) + 7.89 set/node (9) + 7.90 set/obscount (9) + 7.91 set/page (0) + 7.92 set/password (9) + 7.93 set/pinginterval (9) + 7.94 set/privilege (9) + 7.95 set/spider (5) + 7.96 set/sys_qra (9) + 7.97 set/qra (0) + 7.98 set/qth (0) + 7.99 set/talk (0) + 7.100 set/wcy (0) + 7.101 set/wwv (0) + 7.102 set/wx (0) + 7.103 show/baddx (1) + 7.104 show/badnode (6) + 7.105 show/badspotter (1) + 7.106 show/configuration (0) + 7.107 show/configuration/node (0) + 7.108 show/connect (1) + 7.109 show/date (0) + 7.110 show/debug (9) + 7.111 show/dx (0) + 7.112 show/dxcc (0) + 7.113 show/files (0) + 7.114 show/filter (0) + 7.115 show/filter (extended for sysops) (5) + 7.116 show/hops (8) + 7.117 show/isolate (1) + 7.118 show/lockout (9) + 7.119 show/log (8) + 7.120 show/moon (0) + 7.121 show/muf (0) + 7.122 show/node (1) + 7.123 show/prefix (0) + 7.124 show/program (5) + 7.125 show/qra (0) + 7.126 show/qrz (0) + 7.127 show/route (0) + 7.128 show/satellite (0) + 7.129 show/sun (0) + 7.130 show/time (0) + 7.131 show/wcy (0) + 7.132 show/wwv (0) + 7.133 shutdown (5) + 7.134 spoof (9) + 7.135 stat/db (5) + 7.136 stat/channel (5) + 7.137 stat/msg (5) + 7.138 stat/route_node (5) + 7.139 stat/route_user (5) + 7.140 stat/user (5) + 7.141 sysop (0) + 7.142 talk (0) + 7.143 type (0) + 7.144 who (0) + 7.145 wx (0) + 7.146 wx (enhanced for sysops) (5) ______________________________________________________________________ - 1. Hop control - - Starting with version 1.13 there is simple hop control available on a - per node basis. Also it is possible to isolate a network completely so - that you get all the benefits of being on that network, but can't pass - on information from it to any other networks you may be connected to - (or vice versa). - - - 1.1. Basic hop control - - In /spider/data you will find a file called hop_table.pl. This is the - file that controls your hop count settings. It has a set of default - hops on the various PC frames and also a set for each node you want to - alter the hops for. You may be happy with the default settings of - course, but this powerful tool can help to protect and improve the - network. The file will look something like this ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - # hop table construction - # - - package DXProt; - - # default hopcount to use - $def_hopcount = 5; - - # some variable hop counts based on message type - %hopcount = - ( - 11 => 10, - 16 => 10, - 17 => 10, - 19 => 10, - 21 => 10, - ); - - - # the per node hop control thingy - - - %nodehops = - - GB7ADX => { 11 => 8, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, - - GB7UDX => { 11 => 8, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, - GB7BAA => { - 11 => 5, - 12 => 8, - 16 => 8, - 17 => 8, - 19 => 8, - 21 => 8, - }, - }; - - - - - - Each set of hops is contained within a pair of curly braces and - contains a series of PC frame types. PC11 for example is a DX spot. - The figures here are not exhaustive but should give you a good idea of - how the file works. - - - You can alter this file at any time, including whilst the cluster is - running. If you alter the file during runtime, the command load/hops - will bring your changes into effect. - - - - 1.2. Isolating networks - - It is possible to isolate networks from each other on a "gateway" node - using the set/isolate command. - - - The effect of this is to partition an isolated network completely from - another nodes connected to your node. Your node will appear on and - otherwise behave normally on every network to which you are connected, - but data from an isolated network will not cross onto any other - network or vice versa. However all the spot, announce and WWV traffic - and personal messages will still be handled locally (because you are a - real node on all connected networks), that is locally connected users - will appear on all networks and will be able to access and receive - information from all networks transparently. All routed messages will - be sent as normal, so if a user on one network knows that you are a - gateway for another network, he can still still send a talk/announce - etc message via your node and it will be routed across. - - - The only limitation currently is that non-private messages cannot be - passed down isolated links regardless of whether they are generated - locally. This will change when the bulletin routing facility is added. - - - If you use isolate on a node connection you will continue to receive - all information from the isolated partner, however you will not pass - any information back to the isolated node. There are times when you - would like to forward only spots across a link (maybe during a contest - for example). To do this, isolate the node in the normal way and put - in a filter in the /spider/filter/spots directory to override the - isolate. This filter can be very simple and consists of just one line - .... - - - - $in = [ - [ 1, 0, 'd', 0, 3] # The last figure (3) is the hop count - ]; - - - - - - There is a lot more on filtering in the next section. - - - 2. Filtering (Old Style upto v1.44) - - Filters can be set for spots, announcements and WWV. You will find - the directories for these under /spider/filter. You will find some - examples in the directories with the suffix .issue. There are two - types of filter, one for incoming information and one for outgoing - information. Outgoing filters are in the form CALLSIGN.pl and - incoming filters are in the form in_CALLSIGN.pl. Filters can be set - for both nodes and users. - - - All filters work in basically the same way. There are several - elements delimited by commas. There can be many lines in the filter - and they are read from the top by the program. When writing a filter - you need to think carefully about just what you want to achieve. You - are either going to write a filter to accept or to reject. Think of a - filter as having 2 main elements. For a reject filter, you would have - a line or multiple lines rejecting the things you do not wish to - receive and then a default line accepting everything else that is not - included in the filter. Likewise, for an accept filter, you would - have a line or multiple lines accepting the things you wish to receive - and a default line rejecting everthing else. - - - In the example below, a user requires a filter that would only return - SSB spots posted in Europe on the HF bands. This is achieved by first - rejecting the CW section of each HF band and rejecting all of VHF, UHF - etc based on frequency. Secondly, a filter rule is set based on CQ - zones to only accept spots posted in Europe. Lastly, a default filter - rule is set to reject anything outside the filter. - - - - $in = [ - [ 0, 0, 'r', # reject all CW spots - [ - 1800.0, 1850.0, - 3500.0, 3600.0, - 7000.0, 7040.0, - 14000.0, 14100.0, - 18068.0, 18110.0, - 21000.0, 21150.0, - 24890.0, 24930.0, - 28000.0, 28180.0, - 30000.0, 49000000000.0, - ] ,1 ], - [ 1, 11, 'n', [ 14, 15, 16, 20, 33, ], 15 ], #accept EU - [ 0, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else - ]; - - - - - - The actual elements of each filter are described more fully in the - following sections. - - - 2.1. Spots - - The elements of the Spot filter are .... - - - - [action, field_no, sort, possible_values, hops] - - - - - - There are 3 elements here to look at. Firstly, the action element. - This is very simple and only 2 possible states exist, accept (1) or - drop (0). - + 1. Routing and Filtering - The second element is the field_no. There are 13 possiblities to - choose from here .... + 1.1. Introduction + From DXSpider version 1.48, major changes were introduced to the way + node connections are treated. This is part of an ongoing process to + remove problems with loops and to enable talk and other functions to + propagate across the whole of the worldwide cluster network. In fact, + in a Spider network, it would be useful, perhaps even necessary to + have loops. This would give real resilience to the network, meaning + that if a link dropped, the information flow would simply come in and + go out via a different route. Of course, we do not have a complete + network of Spider nodes, there are other programs out there. Some of + these do not have any protection from loops. Certainly AK1A does not + handle loops well at all. It is therefore necessary to have some form + of protection for these nodes. + This is achieved by using filtering on a route basis. There is a + default setting to help to protect the network, especially useful for + new and inexperienced SysOps. The idea is simple. When Spider is + started for the first time and a connection is made to or from another + node, the default is to only send the nodes you already have that are + in your own zone. For example, in the UK the default setting would be + to send only UK nodes to any connection. This can be filtered further + (down to a single node if needed) or expanded as required. + 1.2. Route Filters + As mentioned in the introduction, a default setting exists. If this + is all you want to use then that is fine, you have nothing else to do. + However, if you want to make any alterations then you need to know a + bit about filters. - 0 = frequency - 1 = call - 2 = date in unix format - 3 = comment - 4 = spotter - 5 = spotted dxcc country - 6 = spotter's dxcc country - 7 = origin - 8 = spotted itu - 9 = spotted cq - 10 = spotter's itu - 11 = spotter's cq - 12 = callsign of the channel on which the spot has appeared + It is possible to reset the default setting for node connections + should you wish to do so, however this can be dangerous to the network + unless you have some experience in how all this works.... be careful! + It is also possible to change settings for one connection only. You + can, therefore, have many different filters set dependent on the + amount of node links you have. + I should at this stage give a little bit of background on filters. + All the filters in Spider work in basically the same way. You can + either accept or reject various options in order to create the filter + rules you wish to achieve. Some filters are user settable, others can + only be altered by the sysop. Route filtering can only be done by the + sysop. - The third element tells us what to expect in the fourth element. - There are 4 possibilities .... + 1.3. The default_node filter + As discussed previously, a default setting exists that only sends + nodes from your own zone. This can be overridden by using the + default_node filter option like this ... - n - numeric list of numbers e.g. [ 1,2,3 ] - r - ranges of pairs of numbers e.g. between 2 and 4 or 10 to 17 - [ 2,4, 10,17 ] - a - an alphanumeric regex - d - the default rule + reject/route default_node + or + accept/route default_node - The fifth element is simply the hops to set in this filter. This - would only be used if the filter was for a node of course and - overrides the hop count in hop_table.pl. - - - So, let's look at an example spot filter. It does not matter in the - example who the filter is to be used for. So, what do we need in the - filter? We need to filter the spots the user/node requires and also - set a default rule for anything else outside the filter. Below is a - simple filter that stops spots arriving from outside Europe. - - - - $in = [ - [ 0, 4, 'a', '^(K|N|A|W|VE|VA|J)'], # 0 = drop, 'a' = alphanumeric - [ 1, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else - ]; - - - - - - So the filter is wrapped in between a pair of square brackets. This - tells Spider to look in between these limits. Then each line is - contained within its own square brackets and ends with a comma. Lets - look carefully at the first line. The first element is 0 (drop). - Therefore anything we put on this line will not be accepted. The next - element is 4. This means we are filtering by the spotter. The third - element is the letter "a" which tells the program to expect an - alphanumeric expression in the fourth element. The fourth element is - a list of letters separated by the pipe symbol. - - - - What this line does is tell the program to drop any spots posted by - anyone in the USA, Canada or Japan. - - - The second line is the default rule for anything else. The "d" tells - us this and the line simply reads... accept anything else. - - - You can add as many lines as you need to complete the filter but if - there are several lines of the same type it is neater to enclose them - all as one line. An example of this is where specific bands are set. - We could write this like this .... - - [ 0,0,'r',[1800.0, 2000.0], 1], - [ 0,0,'r',[10100.0, 10150.0], 1], - [ 0,0,'r',[14000.0, 14350.0], 1], - [ 0,0,'r',[18000.0, 18200.0], 1], + where filter_option is one of the following ... + call + call_dxcc + call_itu + call_zone + origin + origin_dxcc + origin_itu + origin_zone - But the line below achieves the same thing and is more efficient .... - [ 0, 0, 'r', - [ - 1800.0, 2000.0, # top band - 10100.0, 10150.0, # WARC - 14000.0, 14350.0, # 20m - 18000.0, 18200.0, # WARC - [ ,1 ], + Please be careful if you alter this setting, it will affect ALL your + links! + 1.4. General route filtering + Exactly the same rules apply for general route filtering. You would + use either an accept filter or a reject filter like this ... - 2.2. Announcements + reject/route + or + accept/route - # This is an example announce or filter allowing only West EU announces - # - # The element list is:- - # 0 - callsign of announcer - # 1 - destination * = all, = routed to the node - # 2 - text - # 3 - * - sysop, - special list eg 6MUK, ' ', normal announce - # 4 - origin - # 5 - 0 - announce, 1 - wx - # 6 - channel callsign (the interface from which this spot came) - $in = [ - [ 1, 0, 'a', '^(P[ABCDE]|DK0WCY|G|M|2|EI|F|ON)' ], - [ 0, 0, 'd', 0 ] - ]; + where filter_option is one of the following ... - In this example, only the prefixes listed will be allowed. It is - possible to be quite specific. The Dutch prefix "P" is followed by - several secondary identifiers which are allowed. So, in the example, - "PA" or "PE" would be ok but not "PG". It is even possible to allow - information from a single callsign. In the example this is DK0WCY, to - allow the posting of his Aurora Beacon. + call + call_dxcc + call_itu + call_zone + origin + origin_dxcc + origin_itu + origin_zone - 2.3. WWV - # This is an example WWV filter - # - # The element list is:- - # 0 - nominal unix date of spot (ie the day + hour:13) - # 1 - the hour - # 2 - SFI - # 3 - K - # 4 - I - # 5 - text - # 6 - spotter - # 7 - origin - # 8 - incoming interface callsign - # this one doesn't filter, it just sets the hop count to 6 and is - # used mainly just to override any isolation from WWV coming from - # the internet. + Here are some examples of route filters ... - $in = [ - [ 1, 0, 'd', 0, 6 ] - ]; + rej/route gb7djk call_dxcc 61,38 (everything except UK+EIRE nodes) + rej/route all (equiv to [very] restricted mode) + acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes) + acc/route gb7djk call gb7djk (equiv to SET/ISOLATE) - It should be noted that the filter will start to be used only once a - user/node has logged out and back in again. - I am not going to spend any more time on these filters now as they - will become more "comprehensive" in the near future. - - 3. Filtering (New Style v1.45 and later) - - 3.1. General filter rules + 1.5. General filter rules Upto v1.44 it was not possible for the user to set their own filters. From v1.45 though that has all changed. It is now possible to set @@ -724,6 +426,9 @@ In general terms you can create a 'reject' or an 'accept' filter which can have up to 10 lines in it. You do this using, for example ... + + + accept/spots ..... reject/spots ..... @@ -754,7 +459,8 @@ - show/filter + + show/filter @@ -764,7 +470,7 @@ the same principles to all types of filter. - 3.2. Types of filter + 1.6. Types of filter There are two main types of filter, accept or reject. You can use either to achieve the result you want dependent on your own preference @@ -790,6 +496,7 @@ then you will ONLY get VHF spots from or to CQ zones 14, 15 and 16. + If you set a reject filter like this ... @@ -819,7 +526,6 @@ - which achieves exactly the same thing. You should choose one or the other until you are comfortable with the way it works. You can mix them if you wish (actually you can have an accept AND a reject on the @@ -856,6 +562,9 @@ originated there). If you did not have the brackets to separate the 2 sections, then Spider would read it logically from the front and see a different expression entirely ... + + + (on 50000/1400000 and by_zone 14,15,16) or call_zone 14,15,16 @@ -883,9 +592,6 @@ clear/spots 1 - - - To remove all the filter lines in the spot filter ... @@ -896,13 +602,13 @@ - 3.3. Filter options + 1.7. Filter options You can filter in several different ways. The options are listed in the various helpfiles for accept, reject and filter. - 3.4. Default filters + 1.8. Default filters Sometimes all that is needed is a general rule for node connects. This can be done with a node_default filter. This rule will always be @@ -928,7 +634,7 @@ to add a rule for the hops for spots also. - 3.5. Advanced filtering + 1.9. Advanced filtering Once you are happy with the results you get, you may like to experiment. @@ -963,10 +669,174 @@ VHF/UHF spots from EU. + 1.10. Basic hop control + + In /spider/data you will find a file called hop_table.pl. This is the + file that controls your hop count settings. It has a set of default + hops on the various PC frames and also a set for each node you want to + alter the hops for. You may be happy with the default settings of + course, but this powerful tool can help to protect and improve the + network. The file will look something like this ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + # + # hop table construction + # + + package DXProt; + + # default hopcount to use + $def_hopcount = 5; + + # some variable hop counts based on message type + %hopcount = + ( + 11 => 10, + 16 => 10, + 17 => 10, + 19 => 10, + 21 => 10, + ); + + + # the per node hop control thingy + + + %nodehops = + + GB7ADX => { 11 => 8, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, + + GB7UDX => { 11 => 8, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, + GB7BAA => { + 11 => 5, + 12 => 8, + 16 => 8, + 17 => 8, + 19 => 8, + 21 => 8, + }, + }; + + + + + + Each set of hops is contained within a pair of curly braces and + contains a series of PC frame types. PC11 for example is a DX spot. + The figures here are not exhaustive but should give you a good idea of + how the file works. + + + You can alter this file at any time, including whilst the cluster is + running. If you alter the file during runtime, the command load/hops + will bring your changes into effect. + + + + 1.11. Isolating networks + + It is possible to isolate networks from each other on a "gateway" node + using the set/isolate command. + + + The effect of this is to partition an isolated network completely from + another node connected to your node. Your node will appear on and + otherwise behave normally on every network to which you are connected, + but data from an isolated network will not cross onto any other + network or vice versa. However all the spot, announce and WWV traffic + and personal messages will still be handled locally (because you are a + real node on all connected networks), that is locally connected users + will appear on all networks and will be able to access and receive + information from all networks transparently. All routed messages will + be sent as normal, so if a user on one network knows that you are a + gateway for another network, he can still still send a talk/announce + etc message via your node and it will be routed across. + + + The only limitation currently is that non-private messages cannot be + passed down isolated links regardless of whether they are generated + locally. This will change when the bulletin routing facility is added. + + + If you use isolate on a node connection you will continue to receive + all information from the isolated partner, however you will not pass + any information back to the isolated node. There are times when you + would like to forward only spots across a link (maybe during a contest + for example). To do this, isolate the node in the normal way and put + in a filter in the /spider/filter/spots directory to override the + isolate. This filter can be very simple and consists of just one line + .... + + + + $in = [ + [ 1, 0, 'd', 0, 3] # The last figure (3) is the hop count + ]; + + + - 4. Other filters - 4.1. Filtering Mail + 2. Other filters + + 2.1. Filtering Mail In the /spider/msg directory you will find a file called badmsg.pl.issue. Rename this to badmsg.pl and edit the file. The @@ -986,8 +856,6 @@ - - # the list of regexes for messages that we won't store having # received them (bear in mind that we must receive them fully before # we can bin them) @@ -1028,7 +896,7 @@ etc in a particular country. - 4.2. Filtering DX callouts (Depricated) + 2.2. Filtering DX callouts (Depricated) From version 1.47, this method is replaced by the command set/baddx @@ -1082,7 +950,7 @@ - 4.3. Filtering words from text fields in Announce, Talk and DX spots + 2.3. Filtering words from text fields in Announce, Talk and DX spots Create a file in /spider/data called badwords. The format is quite simple. Lines beginning with # are ignored so comments can be added. @@ -1107,7 +975,7 @@ load/badwords. - 5. Mail + 3. Mail DXSpider deals seamlessly with standard AK1A type mail. It supports both personal and bulletin mail and the sysop has additional commands @@ -1120,7 +988,7 @@ The cluster mail is automatically deleted after 30 days unless the sysop sets the "keep" flag using the msg command. - 5.1. Personal mail + 3.1. Personal mail Personal mail is sent using the sp command. This is actually the default method of sending mail and so a simple s for send will do. A @@ -1128,7 +996,7 @@ section, so I will not duplicate them here. - 5.2. Bulletin mail + 3.2. Bulletin mail Bulletin mail is sent by using the sb command. This is one of the most common mistakes users make when sending mail. They send a @@ -1140,7 +1008,7 @@ Bulletin addresses can be set using the Forward.pl file. - 5.3. Forward.pl + 3.3. Forward.pl DXSpider receives all and any mail sent to it without any alterations needed in files. Because personal and bulletin mail are treated @@ -1234,7 +1102,7 @@ - 5.4. The msg command + 3.4. The msg command The msg command is a very powerful and flexible tool for the sysop. It allows the sysop to alter to and from fields and make other changes @@ -1274,7 +1142,7 @@ user. - 5.5. Message status + 3.5. Message status You can check on a message from within the cluster by using the command stat/msg. This will give you additional information on the @@ -1303,13 +1171,13 @@ - 5.6. Filtering mail + 3.6. Filtering mail This is described in the section on Other filters so I will not duplicate it here. - 5.7. Distribution lists + 3.7. Distribution lists Distribution lists are simply a list of users to send certain types of mail to. An example of this is mail you only wish to send to other @@ -1329,7 +1197,7 @@ list. - 5.8. BBS interface + 3.8. BBS interface Spider provides a simple BBS interface. No input is required from the sysop of the cluster at all. The BBS simply sets the cluster as a BBS @@ -1342,7 +1210,7 @@ using the Forward.pl file very carefully. - 6. Databases + 4. Databases Spider allows the creation of local or remote databases. It supports chained databases, allowing several different databases to be scanned @@ -1351,7 +1219,7 @@ database but will expand with time. - 6.1. Creating databases + 4.1. Creating databases Creating a database could not be more simple. All the commands are sent from the cluster prompt as the sysop user. @@ -1399,7 +1267,7 @@ chain can be a remote database. - 6.2. Importing databases + 4.2. Importing databases The only databases that Spider can currently import are the standard AK1A databases such as OBLAST or the DB0SDX qsl and address database. @@ -1419,7 +1287,7 @@ does not exist. - 6.3. Checking available databases + 4.3. Checking available databases Once a database is created, you will want to check that it has been added. To do this use the dbavail command. This will output the @@ -1438,7 +1306,7 @@ - 6.4. Looking up databases + 4.4. Looking up databases To look for information in a defined database, simply use the dbshow command, for example ... @@ -1464,7 +1332,7 @@ Now you can simply use show/buckmaster or an abreviation. - 6.5. Removing databases + 4.5. Removing databases To delete an existing database you use the dbremove command. For example ... @@ -1482,9 +1350,9 @@ created from scratch if you still required it. - 7. Information, files and useful programs + 5. Information, files and useful programs - 7.1. MOTD + 5.1. MOTD One of the more important things a cluster sysop needs to do is to get information to his users. The simplest way to do this is to have a @@ -1495,7 +1363,7 @@ to the cluster. - 7.2. Downtime message + 5.2. Downtime message If for any reason the cluster is down, maybe for upgrade or maintenance but the machine is still running, a message can be sent to @@ -1506,7 +1374,7 @@ actually running. - 7.3. Other text messages + 5.3. Other text messages You can set other text messages to be read by the user if they input the file name. This could be for news items or maybe information for @@ -1626,7 +1494,7 @@ The page length will of course depend on what you have it set to! - 7.4. The Aliases file + 5.4. The Aliases file You will find a file in /spider/cmd/ called Aliases. First, copy this file to /spider/local_cmd/Aliases and edit this file. You will see @@ -1790,7 +1658,7 @@ the results once you have set an alias. - 7.5. Console.pl + 5.5. Console.pl In later versions of Spider a simple console program is provided for the sysop. This has a type ahead buffer with line editing facilities @@ -1802,7 +1670,7 @@ edit the file with your favourite editor. - 7.6. Updating kepler data + 5.6. Updating kepler data Spider has a powerful and flexible show/satellite command. In order for this to be accurate, the kepler data has to be updated regularly. @@ -1846,7 +1714,7 @@ - 7.7. The QRZ callbook + 5.7. The QRZ callbook The command sh/qrz will only work once you have followed a few simple steps. First you need to get a user ID and password from qrz.com. @@ -1857,7 +1725,7 @@ proprieter of qrz.com for allowing this access. - 8. CVS + 6. CVS CVS stands for "Concurrent Versions System" and the CVS for DXSpider is held at Sourceforge. This means that it is possible to update your @@ -1981,7 +1849,7 @@ You will find any changes documented in the /spider/Changes file. - 9. The DXSpider command set + 7. The DXSpider command set Below is a complete list of commands available from the cluster prompt. Most maintenance tasks are automatic but there are some @@ -1990,7 +1858,7 @@ is the permissions level needed to use the command. - 9.1. accept/announce (0) + 7.1. accept/announce (0) accept/announce [0-9] Set an accept filter line for announce @@ -2052,7 +1920,7 @@ but this probably for advanced users... - 9.2. accept/announce (extended for sysops) (8) + 7.2. accept/announce (extended for sysops) (8) accept/announce [input] [0-9] Announce filter sysop version @@ -2071,7 +1939,56 @@ - 9.3. accept/spots (0) + 7.3. accept/route (8) + + accept/route [0-9] Set an 'accept' filter line for + routing + + + Create an 'accept this routing PC Protocol' line for a filter. + + + An accept filter line means that if a PC16/17/19/21/24/41/50 matches + this filter it is passed thru that interface. See HELP FILTERING for + more info. Please read this to understand how filters work - it will + save a lot of grief later on. + + + You can use any of the following things in this line:- + + + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + + + + + + some examples:- + + + + acc/route gb7djk call_dxcc 61,38 (send only UK+EIRE nodes) + acc/route gb7djk call gb7djk (equiv to SET/ISOLATE) + + You can use the tag 'all' to accept everything eg: + + + + acc/route all + + + + + + 7.4. accept/spots (0) accept/announce [0-9] Set an accept filter line for spots @@ -2110,6 +2027,7 @@ thus: hf/ssb. You can also just have a simple range like: 0/30000 - this is more efficient than saying simply: freq HF (but don't get too hung up about that) + some examples:- @@ -2126,13 +2044,10 @@ acc/spot 3 all - - - but this probably for advanced users... - 9.4. accept/spots (extended for sysops) (8) + 7.5. accept/spots (extended for sysops) (8) accept/spots [input] [0-9] Spot filter sysop version @@ -2152,7 +2067,7 @@ - 9.5. accept/wcy (0) + 7.6. accept/wcy (0) accept/wcy [0-9] set an accept WCY filter @@ -2185,7 +2100,7 @@ See HELP FILTER for information. - 9.6. accept/wcy (extended for sysops) (8) + 7.7. accept/wcy (extended for sysops) (8) accept/wcy [input] [0-9] WCY filter sysop version @@ -2195,14 +2110,14 @@ - accept/wcy node_default all - set/hops node_default 10 + accept/wcy node_default all + set/hops node_default 10 - 9.7. accept/wwv (0) + 7.8. accept/wwv (0) accept/wwv [0-9] Set an accept WWV filter @@ -2240,9 +2155,7 @@ See HELP FILTER for information. - - - 9.8. accept/wwv (extended for sysops) (8) + 7.9. accept/wwv (extended for sysops) (8) accept/wwv [input] [0-9] WWV filter sysop version @@ -2262,16 +2175,19 @@ - 9.9. announce (0) + + 7.10. announce (0) announce Send an announcement to local users Send an announcement to LOCAL users only, where is the text of - the announcement you wish to broadcast + the announcement you wish to broadcast. If you do not wish to receive + announces, use the set/noannounce command. Any announces made by a + sysop will override set/noannounce. - 9.10. announce full (0) + 7.11. announce full (0) announce full Send an announcement cluster wide @@ -2281,7 +2197,7 @@ - 9.11. announce sysop (5) + 7.12. announce sysop (5) announce sysop @@ -2289,7 +2205,7 @@ Send an announcement to Sysops only - 9.12. apropos (0) + 7.13. apropos (0) apropos Search the help database @@ -2298,7 +2214,7 @@ print the names of all the commands that may be relevant. - 9.13. bye (0) + 7.14. bye (0) bye Exit from the cluster @@ -2306,9 +2222,7 @@ This will disconnect you from the cluster - - - 9.14. catchup (5) + 7.15. catchup (5) catchup All|[ ...] Mark a message as sent @@ -2343,7 +2257,7 @@ Order is not important. - 9.15. clear/spots (0) + 7.16. clear/spots (0) clear/spots [1|all] Clear a spot filter line @@ -2374,7 +2288,7 @@ - acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16) + acc/spot 2 on vhf and (by_zone 14,15,16 or call_zone 14,15,16) @@ -2392,7 +2306,9 @@ - 9.16. connect (5) + + + 7.17. connect (5) connect Start a connection to another DX Cluster @@ -2404,7 +2320,7 @@ cluster . - 9.17. dbavail (0) + 7.18. dbavail (0) dbavail Show a list of all the databases in the system @@ -2413,7 +2329,7 @@ defined in the system. It is also aliased to SHOW/COMMAND. - 9.18. dbcreate (9) + 7.19. dbcreate (9) dbcreate Create a database entry dbcreate chain [..] Create a chained database @@ -2440,6 +2356,7 @@ No checking is done to see if the any of the chained databases exist, in fact it is usually better to do the above statement first then do each of the chained databases. + Databases can exist offsite. To define a database that lives on another node do: @@ -2457,9 +2374,6 @@ It would be normal for you to add an entry into your local Aliases file to allow people to use the 'SHOW/' style syntax. So you would need to add a line like:- - - - 's' => [ .. .. @@ -2481,7 +2395,7 @@ databases. See DBSHOW for generic database enquiry - 9.19. dbimport (9) + 7.20. dbimport (9) dbimport Import AK1A data into a database @@ -2496,7 +2410,7 @@ oblast database held locally. - 9.20. dbremove (9) + 7.21. dbremove (9) dbremove Delete a database @@ -2520,11 +2434,12 @@ You have been warned. - 9.21. dbshow (0) + 7.22. dbshow (0) dbshow Display an entry, if it exists, in a database + This is the generic user interface to the database to the database system. It is expected that the sysop will add an entry to the local Aliases file so that users can use the more familiar AK1A style of @@ -2549,7 +2464,7 @@ - 9.22. debug (9) + 7.23. debug (9) debug Set the cluster program into debug mode @@ -2568,7 +2483,7 @@ finished. - 9.23. directory (0) + 7.24. directory (0) directory List messages directory own List your own messages @@ -2591,7 +2506,6 @@ You can combine some of the various directory commands together eg:- - DIR TO G1TLH 5 or DIR SUBJECT IOTA 200-250 @@ -2612,13 +2526,13 @@ - 9.24. directory (extended for sysops) (5) + 7.25. directory (extended for sysops) (5) Works just like the user command except that sysops can see ALL messages. - 9.25. disconnect (8) + 7.26. disconnect (8) disconnect [ ...] Disconnect a user or node @@ -2626,7 +2540,7 @@ Disconnect any connected locally - 9.26. dx (0) + 7.27. dx (0) dx [by ] Send a DX spot @@ -2636,11 +2550,9 @@ - - - DX FR0G 144.600 - DX 144.600 FR0G - DX 144600 FR0G + DX FR0G 144.600 + DX 144.600 FR0G + DX 144600 FR0G @@ -2659,7 +2571,8 @@ - DX by G1TLH FR0G 144.600 he isn't on the cluster + + DX by G1TLH FR0G 144.600 he isn't on the cluster @@ -2668,7 +2581,7 @@ cluster. See SHOW/BANDS for more information. - 9.27. export (9) + 7.28. export (9) export Export a message to a file @@ -2686,7 +2599,7 @@ EXPORT 2345 /tmp/a - 9.28. export_users (9) + 7.29. export_users (9) export_users [] Export the users database to ascii @@ -2702,9 +2615,7 @@ check is made on the filename (if any) that you specify. - - - 9.29. forward/latlong (8) + 7.30. forward/latlong (8) forward/latlong Send latitude and longitude information to another cluster @@ -2718,7 +2629,7 @@ so it is not recommended on slow links. - 9.30. forward/opername (1) + 7.31. forward/opername (1) forward/opername Send out information on this to all clusters @@ -2730,7 +2641,7 @@ available. - 9.31. help (0) + 7.32. help (0) help Get help on a command @@ -2743,7 +2654,7 @@ commands to look at with HELP. - 9.32. init (5) + 7.33. init (5) init Re-initialise a link to an AK1A compatible node @@ -2757,7 +2668,7 @@ Best of luck - you will need it. - 9.33. kill (0) + 7.34. kill (0) kill [ ..] Delete a message from the local system @@ -2767,10 +2678,7 @@ the sysop). - - - - 9.34. kill (5) + 7.35. kill (5) kill [ ...] Remove or erase a message from the system kill from Remove all messages from a callsign @@ -2783,7 +2691,7 @@ As a sysop you can kill any message on the system. - 9.35. kill full (5) + 7.36. kill full (5) kill full [] Delete a message from the whole cluster @@ -2794,7 +2702,9 @@ same subject will be deleted. Beware! - 9.36. links (0) + + + 7.37. links (0) links Show which nodes are physically connected @@ -2804,7 +2714,7 @@ - 9.37. load/aliases (9) + 7.38. load/aliases (9) load/aliases Reload the command alias table @@ -2815,7 +2725,7 @@ - 9.38. load/baddx (9) + 7.39. load/baddx (9) load/baddx Reload the bad DX table @@ -2825,7 +2735,7 @@ if spotted, will not be passed on. FR0G and TEST are classic examples. - 9.39. load/badmsg (9) + 7.40. load/badmsg (9) load/badmsg Reload the bad message table @@ -2836,7 +2746,8 @@ each message. If any of them match then that message is immediately deleted on receipt. - 9.40. load/badwords (9) + + 7.41. load/badwords (9) load/badwords Reload the badwords file @@ -2850,7 +2761,7 @@ ignored. - 9.41. load/bands (9) + 7.42. load/bands (9) load/bands Reload the band limits table @@ -2859,7 +2770,7 @@ whilst the cluster is running. - 9.42. load/cmd_cache (9) + 7.43. load/cmd_cache (9) load/cmd_cache Reload the automatic command cache @@ -2872,7 +2783,7 @@ was just after a cluster restart. - 9.43. load/forward (9) + 7.44. load/forward (9) load/forward Reload the msg forwarding routing table @@ -2880,7 +2791,7 @@ whilst the cluster is running. - 9.44. load/messages (9) + 7.45. load/messages (9) load/messages Reload the system messages file @@ -2893,7 +2804,7 @@ unknown message 'xxxx' in lang 'en' - 9.45. load/prefixes (9) + 7.46. load/prefixes (9) load/prefixes Reload the prefix table @@ -2902,7 +2813,7 @@ manually whilst the cluster is running. - 9.46. merge (5) + 7.47. merge (5) merge [/] Ask for the latest spots and WWV @@ -2917,7 +2828,7 @@ data). - 9.47. msg (9) + 7.48. msg (9) msg [data ...] Alter various message parameters @@ -2925,9 +2836,6 @@ Alter message parameters like To, From, Subject, whether private or bulletin or return receipt (RR) is required or whether to keep this message from timing out. - - - MSG TO - change TO callsign to MSG FRom - change FROM callsign to MSG PRrivate - set private flag @@ -2953,7 +2861,7 @@ This will display more information on the message than DIR does. - 9.48. pc (8) + 7.49. pc (8) pc Send text (eg PC Protocol) to @@ -2968,10 +2876,11 @@ You can also use in the same way as a talk command to a connected user but without any processing, added of "from to " or whatever. + pc G1TLH Try doing that properly!!! - 9.49. ping (1) + 7.50. ping (1) ping Check the link quality between nodes @@ -2984,7 +2893,7 @@ - 9.50. rcmd (1) + 7.51. rcmd (1) rcmd Send a command to another DX cluster @@ -2992,13 +2901,14 @@ This command allows you to send nearly any command to another DX Cluster node that is connected to the system. + Whether you get any output is dependant on a) whether the other system knows that the node callsign of this cluster is in fact a node b) whether the other system is allowing RCMDs from this node and c) whether you have permission to send this command at all. - 9.51. read (0) + 7.52. read (0) read Read the next unread personal message addressed to you read Read the specified message @@ -3009,7 +2919,7 @@ - 9.52. read (extended for sysops) (5) + 7.53. read (extended for sysops) (5) read Read a message on the system @@ -3017,7 +2927,7 @@ As a sysop you may read any message on the system - 9.53. reject/announce + 7.54. reject/announce reject/announce [0-9] Set a reject filter for announce @@ -3033,19 +2943,18 @@ - - info eg: iota or qsl - by eg: G,M,2 - origin - origin_dxcc eg: 61,62 (from eg: sh/pre G) - origin_itu - origin_zone - by_dxcc - by_itu - by_zone - channel - wx 1 filter WX announces - dest eg: 6MUK,WDX (distros) + info eg: iota or qsl + by eg: G,M,2 + origin + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + by_dxcc + by_itu + by_zone + channel + wx 1 filter WX announces + dest eg: 6MUK,WDX (distros) @@ -3071,7 +2980,7 @@ but this probably for advanced users... - 9.54. reject/announce (extended for sysops) (8) + 7.55. reject/announce (extended for sysops) (8) reject/announce [input] [0-9] Announce filter sysop version @@ -3090,7 +2999,58 @@ - 9.55. reject/spots (0) + 7.56. reject/route (8) + + reject/route [0-9] Set an 'reject' filter line for + routing + + + Create an 'reject this routing PC Protocol' line for a filter. + + + An reject filter line means that if a PC16/17/19/21/24/41/50 matches + this filter it is NOT passed thru that interface. See HELP FILTERING + for more info. Please read this to understand how filters work - it + will save a lot of grief later on. You can use any of the following + things in this line:- + + + + call the callsign of the thingy + call_dxcc eg: 61,62 (from eg: sh/pre G) + call_itu + call_zone + origin really the interface it came in on + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + + + + + + some examples:- + + + + + rej/route gb7djk call_dxcc 61,38 (everything except UK+EIRE nodes) + + + + + + You can use the tag 'all' to reject everything eg: + + + + rej/route all (equiv to [very] restricted mode) + + + + + + 7.57. reject/spots (0) reject/spots [0-9] Set a reject filter line for spots @@ -3139,6 +3099,7 @@ + You can use the tag 'all' to reject everything eg: @@ -3151,7 +3112,7 @@ but this probably for advanced users... - 9.56. reject/spots (extended for sysops) (8) + 7.58. reject/spots (extended for sysops) (8) reject/spots [input] [0-9] Reject spot filter sysop version @@ -3162,21 +3123,17 @@ + reject/spot db0sue-7 1 by_zone 14,15,16 + reject/spot node_default all + set/hops node_default 10 - - - - reject/spot db0sue-7 1 by_zone 14,15,16 - reject/spot node_default all - set/hops node_default 10 - - reject/spot user_default by G,M,2 + reject/spot user_default by G,M,2 - 9.57. reject/wcy (0) + 7.59. reject/wcy (0) reject/wcy [0-9] Set a reject WCY filter @@ -3208,7 +3165,8 @@ See HELP FILTER for information. - 9.58. reject/wcy (extended for sysops) (8) + + 7.60. reject/wcy (extended for sysops) (8) reject/wcy [input] [0-9] WCY reject filter sysop version @@ -3220,7 +3178,7 @@ reject/wcy gb7djk all - 9.59. reject/wwv (0) + 7.61. reject/wwv (0) reject/wwv [0-9] Set a reject WWV filter @@ -3230,17 +3188,15 @@ - - - by eg: G,M,2 - origin - origin_dxcc eg: 61,62 (from eg: sh/pre G) - origin_itu - origin_zone - by_dxcc - by_itu - by_zone - channel + by eg: G,M,2 + origin + origin_dxcc eg: 61,62 (from eg: sh/pre G) + origin_itu + origin_zone + by_dxcc + by_itu + by_zone + channel @@ -3260,7 +3216,7 @@ See HELP FILTER for information. - 9.60. reject/wwv (extended for sysops) (8) + 7.62. reject/wwv (extended for sysops) (8) reject/wwv [input] [0-9] WWV reject filter sysop version @@ -3276,11 +3232,7 @@ reject/wwv user_default by W - - - - - 9.61. reply (0) + 7.63. reply (0) reply Reply (privately) to the last message that you have read reply Reply (privately) to the specified message @@ -3297,8 +3249,7 @@ further details) - - 9.62. send (0) + 7.64. send (0) send [ ...] Send a message to one or more callsigns send RR Send a message and ask for a read receipt @@ -3332,7 +3283,7 @@ is an alias for SEND PRIVATE - 9.63. set/address (0) + 7.65. set/address (0) set/address Record your postal address @@ -3340,15 +3291,14 @@ Literally, record your address details on the cluster. - 9.64. set/announce (0) + 7.66. set/announce (0) set/announce Allow announce messages Allow announce messages to arrive at your terminal. - - 9.65. set/arcluster (5) + 7.67. set/arcluster (5) set/arcluster [ ...] Make the node_call an AR- Cluster type node @@ -3357,13 +3307,12 @@ Set the node_call as an AR-Cluster type node - 9.66. set/baddx (8) + 7.68. set/baddx (8) set/baddx Stop words we do not wish to see in the callsign field of a dx spot being propagated - Setting a word as 'baddx' will prevent spots with that word in the callsign field of a DX spot from going any further. They will not be displayed and they will not be sent onto other nodes. @@ -3387,7 +3336,7 @@ - 9.67. set/badnode (6) + 7.69. set/badnode (6) set/badnode Stop spots from this node_call being propagated @@ -3421,7 +3370,7 @@ FILTERing. - 9.68. set/badspotter (8) + 7.70. set/badspotter (8) set/badspotter Stop spots from this callsign being propagated @@ -3455,7 +3404,7 @@ FILTERing. - 9.69. set/beep (0) + 7.71. set/beep (0) set/beep Add beeps to terminal messages @@ -3463,7 +3412,12 @@ Add a beep to DX and other terminal messages. - 9.70. set/clx (5) + 7.72. set/bbs (5) + + set/bbs [..]Make a BBS + + + 7.73. set/clx (5) set/clx [ ...] Make the node_call a CLX type node @@ -3472,11 +3426,10 @@ Set the node_call as a CLX type node - 9.71. set/debug (9) + 7.74. set/debug (9) set/debug Add a debug level to the debug set - You can choose to log several different levels. The levels are chan state msg cron connect @@ -3486,7 +3439,7 @@ You can remove a debug level with unset/debug - 9.72. set/dx (0) + 7.75. set/dx (0) set/dxAllow DX messages to arrive at your terminal @@ -3494,9 +3447,7 @@ You can stop DX messages with the unset/dx command - - - 9.73. set/dxgrid (0) + 7.76. set/dxgrid (0) set/dxgridAllow grid squares on the end of DX messages @@ -3506,7 +3457,7 @@ to remove the grid squares. - 9.74. set/dxnet (5) + 7.77. set/dxnet (5) set/dxnet [ ...] Make the node_call a DXNet type node @@ -3515,7 +3466,7 @@ Set the node_call as a DXNet type node - 9.75. set/echo (0) + 7.78. set/echo (0) set/echo Make the cluster echo your input @@ -3532,7 +3483,7 @@ YOU DO NOT NEED TO USE THIS COMMAND IF YOU ARE CONNECTED VIA AX25. - 9.76. set/here (0) + 7.79. set/here (0) set/here Set the here flag @@ -3543,7 +3494,9 @@ brackets around your callsign to indicate you are not available. - 9.77. set/homenode (0) + + + 7.80. set/homenode (0) set/homenode Set your home cluster @@ -3560,9 +3513,7 @@ - - - 9.78. set/hops (8) + 7.81. set/hops (8) set/hops ann|spots|wwv|wcy Set hop count @@ -3585,7 +3536,7 @@ creates a filter and works in conjunction with the filter system. - 9.79. set/isolate (9) + 7.82. set/isolate (9) set/isolate Isolate a node from the rest of the network @@ -3603,7 +3554,7 @@ You can remove the isolation with the command unset/isolate. - 9.80. set/language (0) + 7.83. set/language (0) set/language Set the language you wish to use @@ -3611,8 +3562,7 @@ You can select the language that you want the cluster to use. Currently the languages available are en (English) and nl (Dutch). - - 9.81. set/location (0) + 7.84. set/location (0) set/location Set your latitude and longitude @@ -3628,7 +3578,8 @@ - 9.82. set/sys_location (9) + + 7.85. set/sys_location (9) set/sys_location Set your cluster latitude and longitude @@ -3646,7 +3597,7 @@ - 9.83. set/logininfo (0) + 7.86. set/logininfo (0) set/logininfo Show logins and logouts of nodes and users @@ -3656,7 +3607,7 @@ - 9.84. set/lockout (9) + 7.87. set/lockout (9) set/lockout Stop a callsign connecting to the cluster @@ -3665,7 +3616,7 @@ allow the user to connect again, use the unset/lockout command. - 9.85. set/name (0) + 7.88. set/name (0) set/name Set your name @@ -3677,10 +3628,7 @@ set/name Dirk - - - - 9.86. set/node (9) + 7.89. set/node (9) set/node [ ...] Make the callsign an AK1A cluster @@ -3692,12 +3640,10 @@ - - - set/spider - set/dxnet - set/clx - set/arcluster + set/spider + set/dxnet + set/clx + set/arcluster @@ -3705,7 +3651,7 @@ To see what your nodes are set to, use the show/nodes command. - 9.87. set/obscount (9) + 7.90. set/obscount (9) set/obscount Set the 'pump-up' obsolescence counter @@ -3726,7 +3672,7 @@ minutes, it is disconnected. - 9.88. set/page (0) + 7.91. set/page (0) set/page Set the number of lines per page @@ -3747,7 +3693,8 @@ - 9.89. set/password (9) + + 7.92. set/password (9) set/password Set a users password @@ -3759,8 +3706,7 @@ type password. - - 9.90. set/pinginterval (9) + 7.93. set/pinginterval (9) set/pinginterval