From db19182c4e93525b5f4b216ffec2e63c95f52eb8 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 10 Apr 2001 09:36:31 +0000 Subject: [PATCH] standardise build number calc --- Changes | 4 ++++ perl/BBS.pm | 5 ++--- perl/cluster.pl | 47 +++++++++++++++++++++++++++++------------------ 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/Changes b/Changes index cb7a35af..9452892f 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +11Apr01======================================================================= +1. fixed more of the "xxx disappeared from yyy" messages +2. altered the build no logic so that it always checksums the same files +regardless of whatever else you might have in the directory. 10Apr01======================================================================= 1. altered PC21 logic somewhat to eliminate dup PC21s 2. disconnect should remove dangling local users in the routing table. diff --git a/perl/BBS.pm b/perl/BBS.pm index 741fb116..a014ecfe 100644 --- a/perl/BBS.pm +++ b/perl/BBS.pm @@ -16,11 +16,10 @@ use DXUser; use DXChannel; use DB_File; use DXDebug; +use vars qw (@ISA %bid $bidfn $lastbidclean $bidcleanint %hash $maxbidage); @ISA = qw(DXChannel); -use vars qw (%bid $bidfn $lastbidclean $bidcleanint); - %bid = (); # the bid hash $bidfn = "$main::root/msg/bid"; # the bid file filename $lastbidclean = time; # the last time the bid file was cleaned @@ -115,7 +114,7 @@ sub normal } } elsif ($com =~ /^F/) { $self->disconnect; - } elsif ($com =~ /^(B|Q)) { + } elsif ($com =~ /^(B|Q)/) { $self->disconnect; } } diff --git a/perl/cluster.pl b/perl/cluster.pl index 6ac7a3fb..3bed469c 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -41,11 +41,14 @@ BEGIN { $systime = time; } +use DXVars; use Msg; use IntMsg; +use Internet; +use Listeners; use ExtMsg; +use AGWConnect; use AGWMsg; -use DXVars; use DXDebug; use DXLog; use DXLogPrint; @@ -54,21 +57,30 @@ use DXChannel; use DXUser; use DXM; use DXCommandmode; +use DXProtVars; +use DXProtout; use DXProt; use DXMsg; use DXCluster; use DXCron; use DXConnect; +use DXBearing; +use DXDb; +use DXHash; +use DXDupe; use Prefix; use Bands; +use Keps; +use Minimuf; +use Sun; use Geomag; use CmdAlias; use Filter; -use DXDb; use AnnTalk; +use BBS; use WCY; -use DXDupe; use BadWords; +use Timer; use Data::Dumper; use IO::File; @@ -328,21 +340,22 @@ STDOUT->autoflush(1); # calculate build number $build = $main::version; -if (opendir(DIR, "$main::root/perl")) { - my @d = readdir(DIR); - closedir(DIR); - foreach my $fn (@d) { - if ($fn =~ /^cluster\.pl$/ || $fn =~ /\.pm$/) { - my $f = new IO::File "$main::root/perl/$fn" or next; - while (<$f>) { - if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)/ ) { - $build += $1; - last; - } - } - $f->close; +my @fn; +open(CL, "$main::root/perl/cluster.pl") or die "Cannot open cluster.pl $!"; +while () { + next unless /^use\s+([\w:_]+)/; + push @fn, $1; +} +close CL; +foreach my $fn (@fn) { + open(CL, "$main::root/perl/${fn}.pm") or next; + while () { + if (/^#\s+\$Id:\s+[\w\._]+,v\s+(\d+\.\d+)/ ) { + $build += $1; + last; } } + close CL; } Log('cluster', "DXSpider V$version, build $build started"); @@ -363,8 +376,6 @@ dbg('err', "loading user file system ..."); DXUser->init($userfn, 1); # start listening for incoming messages/connects -use Listeners; - dbg('err', "starting listeners ..."); my $conn = IntMsg->new_server($clusteraddr, $clusterport, \&login); $conn->conns("Server $clusteraddr/$clusterport"); -- 2.43.0