+my $valid = 0;
+my $localonly;
+my $oline = $line;
+
+#$DB::single=1;
+
+return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
+return (1, $self->msg('e28')) unless $self->isregistered;
+
+
+my $addr = $self->hostname || '127.0.0.1';
+Log('cmd', "$self->{call}|$addr|dx|$line");
+
+my @bad;
+if (@bad = BadWords::check($line)) {
+ $self->badcount(($self->badcount||0) + @bad);
+ LogDbg('DXCommand', "$self->{call} swore: $line (with words:" . join(',', @bad) . ")");
+ $localonly++;
+}
+
+# do we have at least two args?
+return (1, $self->msg('dx2')) unless @f >= 2;
+
+# as a result of a suggestion by Steve K9AN, I am changing the syntax of
+# 'spotted by' things to "dx by g1tlh <freq> <call>" <freq> and <call>
+# can be in any order
+
+if ($f[0] =~ /^by$/i) {
+ return (1, $self->msg('e5')) unless $main::allowdxby || $self->priv > 1;
+ $spotter = uc $f[1];
+ $line =~ s/^\s*$f[0]\s+$f[1]\s+//;
+ @f = split /\s+/, $line, 3;
+ return (1, $self->msg('dx2')) unless @f >= 2;
+}