X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXDb.pm;h=72ba15d10dac676c5a634523dbdc13ef8b3d8766;hb=62df15dc544d86345ea75b2e72e5215f9841f430;hp=2122234bf8fe9d8c8a6025d73707a3e49d698ab9;hpb=5a06cd7853e8bff86a0f17854c0791bb3f85c395;p=spider.git diff --git a/perl/DXDb.pm b/perl/DXDb.pm index 2122234b..72ba15d1 100644 --- a/perl/DXDb.pm +++ b/perl/DXDb.pm @@ -50,10 +50,8 @@ $nextstream = 0; %stream = (); 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; + +main::mkver($VERSION = q$Revision$); # allocate a new stream for this request sub newstream @@ -156,6 +154,10 @@ sub getkey my $key = uc shift; my $value; + # massage the key + $key =~ s/[\@\$\&\%\*]+//g; + $key =~ s/^[\.\/]+//g; + # make sure we are open $self->open; if ($self->{localcmd}) { @@ -273,7 +275,7 @@ sub handle_45 # incoming DB Information my $n = getstream($_[3]); if ($n) { - my $mchan = DXChannel->get($n->{call}); + my $mchan = DXChannel::get($n->{call}); $mchan->send($_[2] . ":$_[4]") if $mchan; } }