centralise the illegal callsign check at login
authorminima <minima>
Fri, 14 Sep 2001 18:21:43 +0000 (18:21 +0000)
committerminima <minima>
Fri, 14 Sep 2001 18:21:43 +0000 (18:21 +0000)
Changes
perl/Messages
perl/cluster.pl

diff --git a/Changes b/Changes
index 4e77eca50bbea59bea04e970f16722c146cbda9e..fefa8330f3f0fb16374f80934a0f56cf4fbfbf73 100644 (file)
--- a/Changes
+++ b/Changes
@@ -9,6 +9,7 @@ of this will happen when the general mechanism for doing that is available.
 no longer see many of the of talk like announces. Unfortunately you may
 miss the odd useful one as well (but since everything is repeated many times
 you probably won't :-)
+3. centralise the invalid callsign check.
 13Sep01=======================================================================
 1. did some work on making talk more intelligent and fixed a>b problem.
 2. fixed a nasty problem on input when being hit with full buffers of 
index d046a5cfe307c3cdcbf57c59758dc4ce51acceae..0f9c0e136e6deb6fc1cb2d439fe6d24716674968 100644 (file)
@@ -98,6 +98,7 @@ package DXM;
                                filter6 => '$_[0]$_[1] Filter for $[2] not found',
                                grids => 'DX Grid flag set on $_[0]',
                                gridu => 'DX Grid flag unset on $_[0]',
+                               illcall => 'Sorry, $_[0] is an invalid callsign',
                                hasha => '$_[0] already exists in $_[1]',
                                hashb => '$_[0] added to $_[1]',
                                hashc => '$_[0] removed from $_[1]',
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);