X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FBBS.pm;h=a39b41a538ac8dc78857a850fae374669f43af62;hb=2b58ccdf81685a1167a43c38705a0d84b9d8d661;hp=c8f3b1f3dc9f7b979b9fdcd1def3582807784b0f;hpb=f155969d600561b9ef151a7ce2494a0c89aed033;p=spider.git diff --git a/perl/BBS.pm b/perl/BBS.pm index c8f3b1f3..a39b41a5 100644 --- a/perl/BBS.pm +++ b/perl/BBS.pm @@ -16,17 +16,22 @@ 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 $bidcleanint = 86400; # the time between bid cleaning intervals $maxbidage = 60; # the maximum age of a stored bid +use vars qw($VERSION $BRANCH); +$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); +$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; +$main::build += $VERSION; +$main::branch += $BRANCH; + sub init { tie %hash, 'DB_File', $bidfn; @@ -115,7 +120,7 @@ sub normal } } elsif ($com =~ /^F/) { $self->disconnect; - } elsif ($com =~ /^(B|Q)) { + } elsif ($com =~ /^(B|Q)/) { $self->disconnect; } } @@ -123,11 +128,12 @@ sub normal # # end a connection (called by disconnect) # -sub finish +sub disconnect { my $self = shift; my $call = $self->call; Log('BBS', "$call", "disconnected"); + $self->SUPER::disconnect; } # @@ -139,3 +145,5 @@ sub process } +1; +