1. added the start of script files on login/startup. You can now add

commands (for example to set variables) to a file called
/spider/scripts/startup. You can also put in scripts for a callsign which
will be executed when that callsign logs on. A sample script is in the
directory (you did remember to do cvs update -d?). User settable versions
of this will happen when the general mechanism for doing that is available.
2. Added set/unset/anntalk commands. If you unset/anntalk then you will
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 :-)
This commit is contained in:
minima 2001-09-14 17:50:19 +00:00
parent e0e6a2d303
commit 8f58735f5c
11 changed files with 141 additions and 13 deletions

11
Changes
View File

@ -1,3 +1,14 @@
14Sep01=======================================================================
1. added the start of script files on login/startup. You can now add
commands (for example to set variables) to a file called
/spider/scripts/startup. You can also put in scripts for a callsign which
will be executed when that callsign logs on. A sample script is in the
directory (you did remember to do cvs update -d?). User settable versions
of this will happen when the general mechanism for doing that is available.
2. Added set/unset/anntalk commands. If you unset/anntalk then you will
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 :-)
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

View File

@ -1037,16 +1037,31 @@ SP is an alias for SEND PRIVATE
=== 0^SET/ANNOUNCE^Allow announce messages to come out on your terminal
=== 0^UNSET/ANNOUNCE^Stop announce messages coming out on your terminal
=== 0^SET/ANNTALK^Allow talk like announce messages on your terminal
=== 0^UNSET/ANNTALK^Stop talk like announce messages on your terminal
The announce system on legacy cluster nodes is used as a talk
substitute because the network is so poorly connected. If you:
unset/anntalk
you will suppress several of these announces, you may miss the odd
useful one as well, but you would probably miss them anyway in the
welter of useless ones.
set/anntalk
allows you to see them again. This is the default.
=== 5^SET/ARCLUSTER <call> [<call>..]^Make the callsign an AR-Cluster node
=== 8^SET/BADDX <call>..^Stop words we do not wish to see in the callsign field
of a dx spot being propagated
=== 8^UNSET/BADDX <call>..^Allow a word to be seen again in a DX spot
Setting a word as 'baddx' will prevent spots with that word in the
callsign field of a DX spot from going any further. They will not be
displayed and they will not be sent onto other nodes.
=== 8^SET/BADDX <call>..^Stop callsigns in a dx spot being propagated
=== 8^UNSET/BADDX <call>..^Propagate a dx spot with this callsign again
Setting a word as 'baddx' will prevent spots with that word in the
'spotted' field (as in: DX 14001.1 FR0G)of a DX spot from going any
further. They will not be displayed and they will not be sent onto
other nodes.
The word must be wriiten in full, no wild cards are allowed eg:-
The word must be written in full, no wild cards are allowed eg:-
set/baddx FORSALE VIDEO FR0G
@ -1092,6 +1107,23 @@ will allow spots from him again.
Use with extreme care. This command may well be superceded by FILTERing.
=== 8^SET/BADWORD <word>..^Stop things with this word being propagated
=== 8^UNSET/BADWORD <word>..^Propagate things with this word again
Setting a word as a 'badword' will prevent things like spots,
announces or talks with this word in the the text part from going any
further. They will not be displayed and they will not be sent onto
other nodes.
The word must be written in full, no wild cards are allowed eg:-
set/badword annihilate annihilated annihilation
will stop anything with these words in the text.
unset/badspotter annihilated
will allow text with this word again.
=== 0^SET/BEEP^Add a beep to DX and other messages on your terminal
=== 0^UNSET/BEEP^Stop beeps for DX and other messages on your terminal
@ -1314,6 +1346,10 @@ for more information.
Display all the bad spotter's callsigns in the system, see SET/BADSPOTTER
for more information.
=== 1^SHOW/BADWORD^Show all the bad words in the system
Display all the bad words in the system, see SET/BADWORD
for more information.
=== 0^SHOW/CONFIGURATION [<node>]^Show all the nodes and users visible
This command allows you to see all the users that can be seen
and the nodes to which they are connected.

27
cmd/set/anntalk.pl Normal file
View File

@ -0,0 +1,27 @@
#
# set the allow talklike announce flag
#
# Copyright (c) 1998 - Dirk Koopman
#
# $Id$
#
my ($self, $line) = @_;
my @args = split /\s+/, $line;
my $call;
my @out;
@args = $self->call if (!@args || $self->priv < 9);
foreach $call (@args) {
$call = uc $call;
my $chan = DXChannel->get($call);
if ($chan) {
$chan->ann_talk(1);
$chan->user->wantann_talk(1);
push @out, $self->msg('annts', $call);
} else {
push @out, $self->msg('e3', "Set Ann_Talk", $call);
}
}
return (1, @out);

27
cmd/unset/anntalk.pl Normal file
View File

@ -0,0 +1,27 @@
#
# unset the allow talklike announce flag
#
# Copyright (c) 1998 - Dirk Koopman
#
# $Id$
#
my ($self, $line) = @_;
my @args = split /\s+/, $line;
my $call;
my @out;
@args = $self->call if (!@args || $self->priv < 9);
foreach $call (@args) {
$call = uc $call;
my $chan = DXChannel->get($call);
if ($chan) {
$chan->ann_talk(0);
$chan->user->wantann_talk(0);
push @out, $self->msg('anntu', $call);
} else {
push @out, $self->msg('e3', "Unset Ann_Talk", $call);
}
}
return (1, @out);

View File

@ -103,6 +103,7 @@ $count = 0;
senddbg => '8,Sending Debug,yesno',
width => '0,Column Width',
disconnecting => '9,Disconnecting,yesno',
ann_talk => '0,Suppress Talk Anns,yesno',
);
use vars qw($VERSION $BRANCH);

View File

@ -30,9 +30,11 @@ use AnnTalk;
use WCY;
use Sun;
use Internet;
use Script;
use strict;
use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug $suppress_ann_to_talk);
use vars qw(%Cache %cmd_cache $errstr %aliases $scriptbase $maxerrors %nothereslug);
%Cache = (); # cache of dynamically loaded routine's mod times
%cmd_cache = (); # cache of short names
@ -40,8 +42,6 @@ $errstr = (); # error string from eval
%aliases = (); # aliases for (parts of) commands
$scriptbase = "$main::root/scripts"; # the place where all users start scripts go
$maxerrors = 20; # the maximum number of concurrent errors allowed before disconnection
$suppress_ann_to_talk = 1; # don't announce 'to <call> ' or '<call> ' type announcements
use vars qw($VERSION $BRANCH);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
@ -102,6 +102,7 @@ sub start
$self->{wx} = $user->wantwx;
$self->{dx} = $user->wantdx;
$self->{logininfo} = $user->wantlogininfo;
$self->{ann_talk} = $user->wantann_talk;
$self->{here} = 1;
# get the filters
@ -144,6 +145,10 @@ sub start
run_cmd($DXProt::me, "forward/opernam $call");
$user->lastoper($main::systime);
}
# run a script send the output to the punter
my $script = new Script(lc $call);
$script->run($self) if $script;
}
#
@ -705,9 +710,9 @@ sub announce
my $text = shift;
my ($filter, $hops);
if ($suppress_ann_to_talk && $to ne $self->{call}) {
if (!$self->{ann_talk} && $to ne $self->{call}) {
my $call = AnnTalk::is_talk_candidate($_[0], $text);
return if $call && Route::get($call);
return if $call;
}
if ($self->{annfilter}) {

View File

@ -32,6 +32,7 @@ use BadWords;
use DXHash;
use Route;
use Route::Node;
use Script;
use strict;
@ -60,7 +61,7 @@ $baddx = new DXHash "baddx";
$badspotter = new DXHash "badspotter";
$badnode = new DXHash "badnode";
$last10 = $last_pc50 = time;
$ann_to_talk = 1;
$ann_to_talk = 0;
@checklist =
(
@ -272,6 +273,10 @@ sub start
# send info to all logged in thingies
$self->tell_login('loginn');
# run a script send the output to the debug file
my $script = new Script(lc $call);
$script->run($self) if $script;
}
#

View File

@ -71,6 +71,7 @@ $lasttime = 0;
nopings => '9,Ping Obs Count',
wantlogininfo => '9,Login info req,yesno',
wantgrid => '0,DX Grid Info,yesno',
wantann_talk => '0,Talklike Anns,yesno',
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
);
@ -519,6 +520,11 @@ sub wantgrid
return _want('grid', @_);
}
sub wantann_talk
{
return _want('ann_talk', @_);
}
sub wantlogininfo
{
my $self = shift;

View File

@ -14,6 +14,8 @@ package DXM;
already => '$_[0] already connnected',
anns => 'Announce flag set on $_[0]',
annu => 'Announce flag unset on $_[0]',
annts => 'Ann_Talk flag set on $_[0]',
anntu => 'Ann_Talk flag unset on $_[0]',
badnode1 => '$_[0] is now a bad node',
badnode2 => '$_[0] is now a good node',
badnode3 => 'List of Bad Nodes:-',

View File

@ -67,6 +67,7 @@ use DXBearing;
use DXDb;
use DXHash;
use DXDupe;
use Script;
use Prefix;
use Spot;
use Bands;
@ -452,6 +453,8 @@ DXDebug::dbgclean();
# this, such as it is, is the main loop!
dbg("orft we jolly well go ...");
my $script = new Script "startup";
$script->run($DXProt::me) if $script;
#open(DB::OUT, "|tee /tmp/aa");

5
scripts/startup.issue Normal file
View File

@ -0,0 +1,5 @@
#
# startup script example
#
# set maximum no of spots allowed to 100
set/var $Spot::maxspots = 1