projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert PC92 A D & C settings
[spider.git]
/
cmd
/
show
/
badword.pl
diff --git
a/cmd/show/badword.pl
b/cmd/show/badword.pl
index 947f70a4dd78e87d7758beef62ee516c9bcec86f..0f6703b7c352570e44aad3bb94ea0695d36b808d 100644
(file)
--- a/
cmd/show/badword.pl
+++ b/
cmd/show/badword.pl
@@
-1,22
+1,35
@@
#
# show list of bad dx callsigns
#
#
# show list of bad dx callsigns
#
-# Copyright (c)
1998
- Dirk Koopman G1TLH
+# Copyright (c)
2023
- Dirk Koopman G1TLH
#
#
#
#
#
#
+
my ($self, $line) = @_;
return (1, $self->msg('e5')) if $self->remotecmd;
# are we permitted?
return (1, $self->msg('e5')) if $self->priv < 6;
my ($self, $line) = @_;
return (1, $self->msg('e5')) if $self->remotecmd;
# are we permitted?
return (1, $self->msg('e5')) if $self->priv < 6;
+
my @out;
my @l;
my $count = 0;
my @out;
my @l;
my $count = 0;
+my @words = BadWords::check($line);
+my $cand;
+my $w;
-if ($line =~ /^\s*full/i) {
- foreach my $w (BadWords::list_regex(1)) {
+push @out, "Words: " . join ',', @words;
+
+if ($line =~ /^\s*full/i || @words) {
+ foreach $w (BadWords::list_regex(1)) {
++$count;
++$count;
- push @out, $w;
+ if ($line =~ /^\s*full/) {
+ push @out, $w;
+ } elsif (@words) {
+ ($cand) = split /\s+/, $w;
+ #push @out, "cand: $cand";
+ push @out, $w if grep {$cand eq $_} @words;
+ }
}
}
else {
}
}
else {