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