$no = 'No'; # ditto for no
$user_interval = 11*60; # the interval between unsolicited prompts if no traffic
-
# make sure that modules are searched in the order local then perl
BEGIN {
umask 002;
eval {
require local::lib;
};
- import local::lib unless ($@);
+ unless ($@) {
+# import local::lib;
+ import local::lib qw(/spider/perl5lib);
+ }
# root of directory tree for this system
$root = "/spider";
$root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
+ unshift @INC, "$root/perl5lib" unless grep {$_ eq "$root/perl5lib"} @INC;
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
}
# is he locked out ?
+ my $lock;
$user = DXUser::get_current($call);
$conn->conns($call);
my $basecall = $call;
- $basecall =~ s/-\d+$//; # remember this for later multiple user processing
- my $lock;
+ $basecall =~ s/-\d+$//; # remember this for later multiple user processing, it's used for other stuff than checking lockout status
if ($user) {
# make sure we act on any locked status that the actual incoming call has.
$lock = $user->lockout;
- } elsif ($allowmultiple && $call ne $basecall) {
- # if we are allowing multiple connections and there is a basecall minus incoming ssid, use the basecall's lock status
+ } elsif ($basecall ne $call) {
+ # if there isn't a SSID on the $call, then try the base
$user = DXUser::get_current($basecall);
$lock = $user->lockout if $user;
}
}
# open the debug file, set various FHs to be unbuffered
- dbginit($broadcast_debug ? \&DXCommandmode::broadcast_debug : undef);
+ dbginit(undef, $broadcast_debug ? \&DXCommandmode::broadcast_debug : undef);
foreach (@debug) {
dbgadd($_);
}
STDOUT->autoflush(1);
+ # log our path
+ dbg "Perl path: " . join(':', @INC);
# try to load the database
if (DXSql::init($dsn)) {
$main::me->disconnect;
}
- Mojo::IOLoop->stop if --$ending <= 0;
+ Mojo::IOLoop->stop_gracefully if --$ending <= 0;
}
}
DXUser::process();
AGWMsg::process();
DXCron::process(); # do cron jobs
-
+ RBN::process();
+
Timer::handler();
DXLog::flushall();
}