$dofilter = 1 if $self && $self->spotsfilter;
next;
}
- if (lc $f eq 'spotter') {
- dbg("sh/dx by") if isdbg('sh/dx');
- push @flist, 'by';
- next;
- }
if (lc $f eq 'qsl') {
dbg("sh/dx qsl") if isdbg('sh/dx');
push @flist, "info {QSL|VIA}";
dbg("sh/dx qra") if isdbg('sh/dx');
next;
}
- if (grep {lc $f eq $_} qw(zone byzone by_zone itu byitu by_itu state bystate by_state info on) ) {
+ if (grep {lc $f eq $_} qw(zone byzone by_zone itu byitu by_itu state bystate by_state info on spotter by) ) {
$f =~ s/^by(\w)/by_$1/;
push @flist, $f;
push @flist, shift @list if @list;
sub is_callsign
{
return $_[0] =~ m!^
- (?:\d?[A-Z]{1,2}\d*/)? # out of area prefix /
- (?:\d?[A-Z]{1,2}\d+) # main prefix one (required)
+ (?:\d?[A-Z]{1,2}\d{0,2}/)? # out of area prefix /
+ (?:\d?[A-Z]{1,2}\d{1,2}) # main prefix one (required)
[A-Z]{1,5} # callsign letters (required)
(?:-(?:\d{1,2}))? # - nn possibly (eg G8BPQ-8)
(?:/[0-9A-Z]{1,7})? # / another prefix, callsign or special label (including /MM, /P as well as /EURO or /LGT) possibly
{
my ($conn, $msg) = @_;
unless ($msg =~ /^[ABZ]/) {
- if ($msg =~ /^E[-\w]+\|([01])/ && $conn->{csort} eq 'telnet') {
+ if ($msg =~ m{^E[-\w\/]+\|([01])} && $conn->{csort} eq 'telnet') {
$conn->{echo} = $1;
if ($1) {
# $conn->send_raw("\xFF\xFC\x01");
# $conn->send_raw("\xFF\xFB\x01");
}
} else {
- $msg =~ s/^[-\w]+\|//;
+ $msg =~ s{^[-\w\/]+\|}{};
push (@{$conn->{outqueue}}, $msg . $conn->{lineend});
}
}
&{$conn->{rproc}}($conn, "I$conn->{call}|$msg");
} elsif ($conn->{state} eq 'WL' ) {
$msg = uc $msg;
- if (is_callsign($msg) && $msg !~ m|/| ) {
- my $sort = $conn->{csort};
- $sort = 'local' if $conn->{peerhost} =~ /127\.\d+\.\d+\.\d+$/ || $conn->{peerhost} eq '::1';
- my $uref;
- if ($main::passwdreq || ($uref = DXUser::get_current($msg)) && $uref->passwd ) {
- $conn->conns($msg);
- $conn->{state} = 'WP';
- $conn->{decho} = $conn->{echo};
- $conn->{echo} = 0;
- $conn->send_raw('password: ');
+ if (is_callsign($msg)) {
+ if ($main::allowslashcall || $msg !~ m|/|) {
+ my $sort = $conn->{csort};
+ $sort = 'local' if $conn->{peerhost} =~ /127\.\d+\.\d+\.\d+$/ || $conn->{peerhost} eq '::1';
+ my $uref;
+ if ($main::passwdreq || ($uref = DXUser::get_current($msg)) && $uref->passwd ) {
+ $conn->conns($msg);
+ $conn->{state} = 'WP';
+ $conn->{decho} = $conn->{echo};
+ $conn->{echo} = 0;
+ $conn->send_raw('password: ');
+ } else {
+ $conn->to_connected($msg, 'A', $sort);
+ }
} else {
- $conn->to_connected($msg, 'A', $sort);
+ $conn->send_now("Sorry $msg is an invalid callsign");
+ $conn->disconnect;
}
} else {
$conn->send_now("Sorry $msg is an invalid callsign");
filter4 => '$_[0]$_[1] Filter $_[2] deleted for $_[3]',
filter5 => 'need some filter commands...',
filter6 => '$_[0]$_[1] Filter for $[2] not found',
+ filter7 => '$_[0] parse error $_[1] on $_[2]',
grayline1 => ' Beg of End of',
grayline2 => 'Location dd/mm/yyyy Dawn Rise Set Dusk',
grids => 'DX Grid enabled for $_[0]',