added mark messages as read or unread
authordjk <djk>
Fri, 10 Dec 1999 22:21:02 +0000 (22:21 +0000)
committerdjk <djk>
Fri, 10 Dec 1999 22:21:02 +0000 (22:21 +0000)
Changes
cmd/Commands_en.hlp
cmd/msg.pl
cmd/set/node.pl
cmd/show/dx.pl
data/bands.pl
perl/Bands.pm
perl/Messages
perl/cluster.pl

diff --git a/Changes b/Changes
index 178800933ee21d17dc8f0bff2009b068f311cfc4..db380399651a6b9a8441f14a83940d6f31e25a36 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,15 @@
+10Dec99=======================================================================
+1. allow msgs to marked as read or unread
+02Dec99=======================================================================
+1. DX command doesn't recognise '6M' as '6m' in SH/DX ON 6M.
+2. set/node now sets the homenode as the callsign.
+3. changed the label for the 18Mhz band from '18m' to '17m' in the bands 
+table. 
+01Dec99=======================================================================
+1. started the callbot which lives at n2tly.dxcluster.net 9000.
+2. added www.qrz.com
+3. added www.buck.com
+4. added k4ute at no4j.com
 28Nov99=======================================================================
 1. fixed all the stupid errors introduced in 1.36 confusing DXUser->get with
 DXCluster->get_exact.
index ce9d426f52feed582d390074ccdeace445dbbc23..cef3c5da46ccb476ad764b11dc6f2492d89c4a74 100644 (file)
@@ -296,6 +296,8 @@ out.
   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
 
index 36b75dc7a9f116a824b2f22e4a8a566d76a155cd..a1a3df0616e21927a03ae85e0abe69078a2fdf96 100644 (file)
@@ -59,6 +59,16 @@ if ($cmd =~ /^to/i) {
        $old = $ref->private ? 'P' : 'B';
        $new = 'B';
        $ref->private(0);
+} elsif ($cmd =~ /^re/i) {
+    $m = 'Msg Type';
+       $old = $ref->read ? 'Read' : 'Unread';
+       $new = 'Read';
+       $ref->read(1);
+} elsif ($cmd =~ /^(nore|unre)/i) {
+    $m = 'Msg Type';
+       $old = $ref->read ? 'Read' : 'Unread';
+       $new = 'Unread';
+       $ref->read(0);
 } elsif ($cmd =~ /^rr/i) {
     $m = 'RR Req';
        $old = $ref->rrreq ? 'RR Req' : 'No RR Req';
@@ -88,7 +98,9 @@ if ($cmd =~ /^to/i) {
        $old = cldatetime($ref->waitt) || 'None';
        $new = 'None'; 
     $ref->waitt(0);
-} 
+} else {
+       return (1, $self->msg('e15', $cmd));
+}
 
 # store changes and return     
 $ref->store( [ $ref->read_msg_body() ] );
index 2a8c1479508b12c303c6da25a20ee503f2a1c887..0895b20c9bfa497423395ed48d5ff48402dc3d64 100644 (file)
@@ -28,6 +28,7 @@ foreach $call (@args) {
                $user = DXUser->new($call) if $create;
                if ($user) {
                        $user->sort('A');
+                       $user->homenode($call);
                        $user->close();
                        push @out, $self->msg($create ? 'nodec' : 'node', $call);
                } else {
index 2af75e7ce09a21ae897bec57ee75f6424ed1e7c6..b10ee7cd61260a40e7b85b0332cbcd26b07e13b6 100644 (file)
@@ -32,7 +32,7 @@ while ($f = shift @list) {            # next field
        }
        if (lc $f eq 'on' && $list[0]) { # is it freq range?
                #    print "yup freq\n";
-               my @r = split '/', $list[0];
+               my @r = split '/', lc $list[0];
                        # print "r0: $r[0] r1: $r[1]\n";
                my @fr = Bands::get_freq($r[0], $r[1]);
                if (@fr) {                      # yup, get rid of extranous param
index 4e64a38a468cd1777e0a14bb26b8fa1c27f5f0f5..bb361258652d7728e01378d91e340ea8b1ef7c17 100644 (file)
@@ -10,6 +10,8 @@
 # There MUST be at last a 'band' entry
 #
 # It is up to YOU to make sure that it makes sense!
+#
+# ALL the labels MUST BE in lower case.
 # 
 
 
@@ -17,7 +19,7 @@
   '73khz' => bless ( { band => [71, 75],
                       }, 'Bands'),
                      
-  '136Khz' => bless ( { band => [135, 138],
+  '136khz' => bless ( { band => [135, 138],
                       }, 'Bands'),
 
   '160m' => bless( { band => [ 1800, 2000 ], 
@@ -52,7 +54,7 @@
                     data => [ 14070, 14098, 14101, 14111 ],
                   }, 'Bands'),
 
-  '18m' => bless( { band => [ 18068, 18168 ], 
+  '17m' => bless( { band => [ 18068, 18168 ], 
                     cw => [ 18068, 18100 ], 
                     ssb => [ 18111, 18168 ], 
                     data => [ 18101, 18108], 
index 55ac154c358022155833669327c301c18f77c830..7e67a60e3fb70e63ddc71b46e552e6a2e7f6ca50 100644 (file)
@@ -16,72 +16,72 @@ use Carp;
 use strict;
 use vars qw(%bands %regions %aliases $bandsfn %valid);
 
-%bands = ();   # the 'raw' band data
-%regions = ();  # list of regions for shortcuts eg vhf ssb
-%aliases = ();  # list of aliases
+%bands = ();                                   # the 'raw' band data
+%regions = ();                                 # list of regions for shortcuts eg vhf ssb
+%aliases = ();                                 # list of aliases
 $bandsfn = "$main::data/bands.pl";
 
 %valid = (
-  cw => '0,CW,parraypairs',
-  ssb => '0,SSB,parraypairs',
-  data => '0,DATA,parraypairs',
-  sstv => '0,SSTV,parraypairs',
-  fstv => '0,FSTV,parraypairs',
-  rtty => '0,RTTY,parraypairs',
-  pactor => '0,PACTOR,parraypairs',
-  packet => '0,PACKET,parraypairs',
-  repeater => '0,REPEATER,parraypairs',
-  fax => '0,FAX,parraypairs',
-  beacon => '0,BEACON,parraypairs',
-  band => '0,BAND,parraypairs',
-);
+                 cw => '0,CW,parraypairs',
+                 ssb => '0,SSB,parraypairs',
+                 data => '0,DATA,parraypairs',
+                 sstv => '0,SSTV,parraypairs',
+                 fstv => '0,FSTV,parraypairs',
+                 rtty => '0,RTTY,parraypairs',
+                 pactor => '0,PACTOR,parraypairs',
+                 packet => '0,PACKET,parraypairs',
+                 repeater => '0,REPEATER,parraypairs',
+                 fax => '0,FAX,parraypairs',
+                 beacon => '0,BEACON,parraypairs',
+                 band => '0,BAND,parraypairs',
+                );
 
 # load the band data
 sub load
 {
-  %bands = ();
-  do $bandsfn;
-  confess $@ if $@;
+       %bands = ();
+       do $bandsfn;
+       confess $@ if $@;
 }
 
 # obtain a band object by callsign [$obj = Band::get($call)]
 sub get
 {
-  my $call = shift;
-  my $ncall = $aliases{$call};
-  $call = $ncall if $ncall;
-  return $bands{$call};
+       my $call = shift;
+       my $ncall = $aliases{$call};
+       $call = $ncall if $ncall;
+       return $bands{$call};
 }
 
 # obtain all the band objects
 sub get_all
 {
-  return values(%bands);
+       return values(%bands);
 }
 
 # get all the band keys
 sub get_keys
 {
-  return keys(%bands);
+       return keys(%bands);
 }
 
 # get all the region keys
 sub get_region_keys
 {
-  return keys(%regions);
+       return keys(%regions);
 }
 
 # get all the alias keys
 sub get_alias_keys
 {
-  return keys(%aliases);
+       return keys(%aliases);
 }
 
 # get a region 
 sub get_region
 {
-  my $reg = shift;
-  return $regions{$reg};
+       my $reg = shift;
+       return $regions{$reg};
 }
 
 # get all the frequency pairs associated with the band and sub-band offered
@@ -90,27 +90,27 @@ sub get_region
 # called Bands::get_freq(band-label, subband-label)
 sub get_freq
 {
-  my ($band, $subband) = @_;
-  my @band;
-  my $b;
-  my @out;
-  return () if !$band;
-  $subband = 'band' if !$subband;
+       my ($band, $subband) = @_;
+       my @band;
+       my $b;
+       my @out;
+       return () if !$band;
+       $subband = 'band' if !$subband;
   
-  # first look in the region
-  $b = $regions{$band};
-  @band = @$b if $b;
-  @band = ($band) if @band == 0;
+       # first look in the region
+       $b = $regions{$band};
+       @band = @$b if $b;
+       @band = ($band) if @band == 0;
   
-  # we now have a list of bands to scan for sub bands
-  foreach $b (@band) {
-    my $wb = $bands{$b};
-       if ($wb) {
-         my $sb = $wb->{$subband};
-         push @out, @$sb if $sb;
+       # we now have a list of bands to scan for sub bands
+       foreach $b (@band) {
+               my $wb = $bands{$b};
+               if ($wb) {
+                       my $sb = $wb->{$subband};
+                       push @out, @$sb if $sb;
+               }
        }
-  }
-  return @out;
+       return @out;
 }
 
 #
@@ -119,7 +119,7 @@ sub get_freq
 
 sub fields
 {
-  return keys(%valid);
+       return keys(%valid);
 }
 
 #
@@ -128,19 +128,19 @@ sub fields
 
 sub field_prompt
 { 
-  my ($self, $ele) = @_;
-  return $valid{$ele};
+       my ($self, $ele) = @_;
+       return $valid{$ele};
 }
 
 no strict;
 sub AUTOLOAD
 {
-  my $self = shift;
-  my $name = $AUTOLOAD;
-  return if $name =~ /::DESTROY$/;
-  $name =~ s/.*:://o;
+       my $self = shift;
+       my $name = $AUTOLOAD;
+       return if $name =~ /::DESTROY$/;
+       $name =~ s/.*:://o;
   
-  @_ ? $self->{$name} = shift : $self->{$name} ;
+       @_ ? $self->{$name} = shift : $self->{$name} ;
 }
 
 1;
index 7fa5be92e4f7d116d4a3b8bb65ce05f4aaee17c3..54813c27596ad2ef64f29be61868d136429db5ee 100644 (file)
@@ -54,6 +54,7 @@ package DXM;
                                e12 => 'Need a node callsign',
                                e13 => '$_[0] is not a node',
                                e14 => 'First argument must be numeric and > 0',
+                               e15 => 'invalid qualifier \"$_[0]\"',
                                
                                emaile1 => 'Please enter your email address, set/email <your e-mail address>',
                                emaila => 'Your E-Mail Address is now \"$_[0]\"',
index a84918bd10e4616eed0725256194ab57b352485b..4f88ef02d0ee3925206311ec2c355f400811e5c2 100755 (executable)
@@ -70,7 +70,7 @@ package main;
 
 @inqueue = ();                                 # the main input queue, an array of hashes
 $systime = 0;                                  # the time now (in seconds)
-$version = "1.37";                             # the version no of the software
+$version = "1.38";                             # the version no of the software
 $starttime = 0;                 # the starting time of the cluster   
 $lockfn = "cluster.lock";       # lock file name
 @outstanding_connects = ();     # list of outstanding connects