and dates of incidents).
2. Moved DXVars.pm to DXVars.pm.issue to force new users to cp it to their
local directory.
3. added $allowzero to DXProt to allow thru PC19s with zero protocol versions.
+15Jun99=======================================================================
+1. added grepdbg program (so you can search your debug files and get times
+and dates of incidents).
+2. Moved DXVars.pm to DXVars.pm.issue to force new users to cp it to their
+local directory.
+3. added $allowzero to DXProt to allow thru PC19s with zero protocol versions.
14Jun99=======================================================================
1. changed IO::File in help and apropos to IO::File
2. added a check for isa('DXNode') for PC50s
use IO::File;
use DXVars;
-use DXDebug ();
+# use DXDebug ();
use DXUtil;
use Julian;
use Carp;
$ref->{'sort'} = $sort;
# make sure the directory exists
- mkdir($ref->{prefix}, 0777) if ! -e $ref->{prefix};
+ mkdir($ref->{prefix}, 0777) unless -e $ref->{prefix};
return bless $ref;
}
$self->{year} = $year;
$self->{thing} = $thing;
- DXDebug::dbg("dxlog", "opening $self->{fn}\n");
+# DXDebug::dbg("dxlog", "opening $self->{fn}\n");
return $self->{fh};
}
use vars qw($me $pc11_max_age $pc11_dup_age $pc23_dup_age
%spotdup %wwvdup $last_hour %pings %rcmds
%nodehops @baddx $baddxfn $pc12_dup_age
- %anndup);
+ %anndup $allowzero);
$me = undef; # the channel id for this cluster
$pc11_max_age = 1*3600; # the maximum age for an incoming 'real-time' pc11
my $call = uc $field[$i+1];
my $confmode = $field[$i+2];
my $ver = $field[$i+3];
+
+ $ver = 5400 if !$ver && $allowzero;
# now check the call over
my $node = DXCluster->get_exact($call);
+++ /dev/null
-#
-# The system variables - those indicated will need to be changed to suit your
-# circumstances (and callsign)
-#
-# Copyright (c) 1998 - Dirk Koopman G1TLH
-#
-# $Id$
-#
-
-package main;
-
-require Exporter;
-@ISA = qw(Exporter);
-
-@EXPORT_OK = qw($mycall $myname $myalias $mylatitude $mylongtitude $mylocator
- $myqth $myemail $myprot_version
- $clusterport $clusteraddr $debugfn
- $def_hopcount $data $system $cmd
- $userfn $motd $local_cmd $mybbsaddr
- $lang
- $pc50_interval $user_interval
- );
-
-
-# this really does need to change for your system!!!!
-$mycall = "GB7DJK";
-
-# your name
-$myname = "Dirk";
-
-# Your 'normal' callsign
-$myalias = "G1TLH";
-
-# Your latitude (+)ve = North (-)ve = South in degrees and decimal degrees
-$mylatitude = +52.68584579;
-
-# Your Longtitude (+)ve = East, (-)ve = West in degrees and decimal degrees
-$mylongitude = +0.94518260;
-
-# Your locator (yes I know I can calculate it - eventually)
-$mylocator = "JO02LQ";
-
-# Your QTH (roughly)
-$myqth = "East Dereham, Norfolk";
-
-# Your e-mail address
-$myemail = "djk\@tobit.co.uk";
-
-# Your BBS addr
-$mybbsaddr = "G1TLH\@GB7TLH.#35.GBR.EU";
-
-# the default language (the key used must match the one in the Messages file)
-$lang = 'en';
-
-# the tcp address of the cluster this can be an address of an ethernet port
-# but this is more secure. For normal use this will be fine.
-$clusteraddr = "localhost";
-
-# the port number of the cluster (just leave this, unless it REALLY matters to you)
-$clusterport = 27754;
-
-# your favorite way to say 'Yes'
-$yes = 'Yes';
-
-# your favorite way to say 'No'
-$no = 'No';
-
-# the interval between unsolicited prompts if not traffic
-$user_interval = 11*60;
-
-# data files live in
-$data = "$root/data";
-
-# system files live in
-$system = "$root/sys";
-
-# command files live in
-$cmd = "$root/cmd";
-
-# local command files live in (and overide $cmd)
-$localcmd = "$root/local_cmd";
-
-# where the user data lives
-$userfn = "$data/users";
-
-# the "message of the day" file
-$motd = "$data/motd";
-
-# are we debugging ?
-@debug = ('chan', 'state', 'msg', 'cron');
--- /dev/null
+#
+# The system variables - those indicated will need to be changed to suit your
+# circumstances (and callsign)
+#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+package main;
+
+require Exporter;
+@ISA = qw(Exporter);
+
+@EXPORT_OK = qw($mycall $myname $myalias $mylatitude $mylongtitude $mylocator
+ $myqth $myemail $myprot_version
+ $clusterport $clusteraddr $debugfn
+ $def_hopcount $data $system $cmd
+ $userfn $motd $local_cmd $mybbsaddr
+ $lang
+ $pc50_interval $user_interval
+ );
+
+
+# this really does need to change for your system!!!!
+$mycall = "GB7DJK";
+
+# your name
+$myname = "Dirk";
+
+# Your 'normal' callsign
+$myalias = "G1TLH";
+
+# Your latitude (+)ve = North (-)ve = South in degrees and decimal degrees
+$mylatitude = +52.68584579;
+
+# Your Longtitude (+)ve = East, (-)ve = West in degrees and decimal degrees
+$mylongitude = +0.94518260;
+
+# Your locator (yes I know I can calculate it - eventually)
+$mylocator = "JO02LQ";
+
+# Your QTH (roughly)
+$myqth = "East Dereham, Norfolk";
+
+# Your e-mail address
+$myemail = "djk\@tobit.co.uk";
+
+# Your BBS addr
+$mybbsaddr = "G1TLH\@GB7TLH.#35.GBR.EU";
+
+# the default language (the key used must match the one in the Messages file)
+$lang = 'en';
+
+# the tcp address of the cluster this can be an address of an ethernet port
+# but this is more secure. For normal use this will be fine.
+$clusteraddr = "localhost";
+
+# the port number of the cluster (just leave this, unless it REALLY matters to you)
+$clusterport = 27754;
+
+# your favorite way to say 'Yes'
+$yes = 'Yes';
+
+# your favorite way to say 'No'
+$no = 'No';
+
+# the interval between unsolicited prompts if not traffic
+$user_interval = 11*60;
+
+# data files live in
+$data = "$root/data";
+
+# system files live in
+$system = "$root/sys";
+
+# command files live in
+$cmd = "$root/cmd";
+
+# local command files live in (and overide $cmd)
+$localcmd = "$root/local_cmd";
+
+# where the user data lives
+$userfn = "$data/users";
+
+# the "message of the day" file
+$motd = "$data/motd";
+
+# are we debugging ?
+@debug = ('chan', 'state', 'msg', 'cron');
package Julian;
-use DXDebug;
use Carp;
use strict;
my $ref;
my $i;
my $count;
- my @today = Julian::unixtoj(time);
+ my @today = Julian::unixtoj(time());
my @fromdate;
my @todate;
--- /dev/null
+#!/usr/bin/perl
+#
+# Program to do a grep with dates and times on the debug
+# files
+#
+# dispdbg [-nnn ...] <string>
+#
+# the -nnn is the day you what to look at -1 is yesterday -0 is today
+# and is optional if there is only one argument
+# <string> is the string, a caseless search is done
+#
+#
+
+require 5.004;
+
+# 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/local";
+}
+
+use DXVars;
+use DXUtil;
+use DXLog;
+
+use strict;
+
+use vars qw(@list $fp @today $string);
+
+$fp = DXLog::new('debug', 'dat', 'd');
+@today = Julian::unixtoj(time());
+
+for my $arg (@ARGV) {
+ if ($arg =~ /^-/) {
+ $arg =~ s/^-//o;
+ push @list, $arg;
+ } else {
+ $string = $arg;
+ last;
+ }
+}
+die "usage: dispdbg [[-nnn] ..] <string>\n" unless $string;
+
+push @list, "0" unless @list;
+for my $entry (@list) {
+ my @now = Julian::sub(@today, $entry);
+ my $fh = $fp->open(@now);
+ my $line;
+ if ($fh) {
+ while (<$fh>) {
+ my $line = $_;
+ chomp $line;
+ if ($line =~ m{\Q$string}io) {
+ my @line = split '\^', $line;
+ my $t = shift @line;
+ print atime($t), ' ', join('^', @line), "\n";
+ }
+ }
+ $fp->close();
+ }
+}
+exit(0);