From: minima Date: Fri, 14 Sep 2001 18:21:43 +0000 (+0000) Subject: centralise the illegal callsign check at login X-Git-Tag: R_1_48~11 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1247daf765691411848e68517bd1bb59cdaf731f;p=spider.git centralise the illegal callsign check at login --- diff --git a/Changes b/Changes index 4e77eca5..fefa8330 100644 --- 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 diff --git a/perl/Messages b/perl/Messages index d046a5cf..0f9c0e13 100644 --- a/perl/Messages +++ b/perl/Messages @@ -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]', diff --git a/perl/cluster.pl b/perl/cluster.pl index a735ca9a..4cb4ea64 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -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);