centralise the illegal callsign check at login
[spider.git] / perl / cluster.pl
index 98eabf63bc7f30d10749535ffec969243cd32588..4cb4ea6455824f9ddb604194a5cdba625a216484 100755 (executable)
@@ -111,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;
 
@@ -141,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);