projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo
[spider.git]
/
perl
/
BBS.pm
diff --git
a/perl/BBS.pm
b/perl/BBS.pm
index e2920a476f23d3fa21bde78e71f23b6bc202162e..9e8998748f6ee89ea884bc7b76babef1f609c2c1 100644
(file)
--- a/
perl/BBS.pm
+++ b/
perl/BBS.pm
@@
-15,18
+15,23
@@
use strict;
use DXUser;
use DXChannel;
use DB_File;
use DXUser;
use DXChannel;
use DB_File;
-use Carp;
+use DXDebug;
+use vars qw (@ISA %bid $bidfn $lastbidclean $bidcleanint %hash $maxbidage);
@ISA = qw(DXChannel);
@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
%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,0));
+$main::build += $VERSION;
+$main::branch += $BRANCH;
+
sub init
{
tie %hash, 'DB_File', $bidfn;
sub init
{
tie %hash, 'DB_File', $bidfn;
@@
-39,7
+44,6
@@
sub init
sub new
{
my $self = DXChannel::alloc(@_);
sub new
{
my $self = DXChannel::alloc(@_);
- $self->{'sort'} = 'B';
return $self;
}
return $self;
}
@@
-116,7
+120,7
@@
sub normal
}
} elsif ($com =~ /^F/) {
$self->disconnect;
}
} elsif ($com =~ /^F/) {
$self->disconnect;
- } elsif ($com =~ /^(B|Q)) {
+ } elsif ($com =~ /^(B|Q)
/
) {
$self->disconnect;
}
}
$self->disconnect;
}
}
@@
-124,11
+128,12
@@
sub normal
#
# end a connection (called by disconnect)
#
#
# end a connection (called by disconnect)
#
-sub
finish
+sub
disconnect
{
my $self = shift;
my $call = $self->call;
Log('BBS', "$call", "disconnected");
{
my $self = shift;
my $call = $self->call;
Log('BBS', "$call", "disconnected");
+ $self->SUPER::disconnect;
}
#
}
#
@@
-140,3
+145,5
@@
sub process
}
}
+1;
+