X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=4cb4ea6455824f9ddb604194a5cdba625a216484;hb=1247daf765691411848e68517bd1bb59cdaf731f;hp=aa95e7ac680df8c1f16ca30992312c6c69083da3;hpb=60d889442d24ab5567fe0b6c9bb923f4297a07bd;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index aa95e7ac..4cb4ea64 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -67,6 +67,7 @@ use DXBearing; use DXDb; use DXHash; use DXDupe; +use Script; use Prefix; use Spot; use Bands; @@ -110,7 +111,7 @@ $starttime = 0; # the starting time of the cluster use vars qw($VERSION $BRANCH $build $branch); $VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ ); $BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0; -$main::build += 15; # add an offset to make it bigger than last system +$main::build += 14; # add an offset to make it bigger than last system $main::build += $VERSION; $main::branch += $BRANCH; @@ -140,7 +141,12 @@ sub new_channel my ($conn, $msg) = @_; my ($sort, $call, $line) = DXChannel::decode_input(0, $msg); return unless defined $sort; - + + unless (is_callsign($call)) { + already_conn($conn, $call, DXM::msg($lang, "illcall", $call)); + return; + } + # set up the basic channel info # is there one already connected to me - locally? my $user = DXUser->get($call); @@ -159,7 +165,8 @@ sub new_channel # is he locked out ? if ($user->lockout) { - Log('DXCommand', "$call is locked out, disconnected"); + my $host = $conn->{peerhost} || "unknown"; + Log('DXCommand', "$call on $host is locked out, disconnected"); $conn->disconnect; return; } @@ -451,6 +458,8 @@ DXDebug::dbgclean(); # this, such as it is, is the main loop! dbg("orft we jolly well go ..."); +my $script = new Script "startup"; +$script->run($DXProt::me) if $script; #open(DB::OUT, "|tee /tmp/aa");