add disc users|nodes|all to disconnect cmd

This commit is contained in:
Dirk Koopman 2008-05-13 12:53:47 +01:00
parent ed96190995
commit 8b21846900
5 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,6 @@
13May08=======================================================================
1. add disc users|nodes|all so that each of these classes can be disconnected
in one command. From a request by Mauro IV3SCP.
12May08=======================================================================
1. add 'exact' keyword on sh/dx to allow for an exact match to a callsign.
From a request by Robert HB9DZA.

View File

@ -583,8 +583,20 @@ You can abbreviate all the commands to one letter and use ak1a syntax:-
=== 5^DIRECTORY-^
Sysops can see all users' messages.
=== 8^DISCONNECT <call> [<call> ...]^Disconnect a user or cluster
Disconnect any <call> connected locally
=== 8^DISCONNECT <call> [<call> ...]^Disconnect user(s) or node(s)
Disconnect any <call> connected locally.
In addition you can disconnect all users (except yourself) with
DISC users
or all nodes with:
DISC nodes
or everything (except yourself) with
DISC all
=== 0^DX [BY <call>] <freq> <call> <remarks>^Send a DX spot
This is how you send a DX Spot to other users. You can, in fact, now

View File

@ -10,6 +10,13 @@ if ($self->priv < 5) {
return (1, $self->msg('e5'));
}
if ($calls[0] =~ /^user/i ) {
@calls = grep {$_ ne $self->call} DXChannel::get_all_user_calls();
} elsif ($calls[0] =~ /^node/i) {
@calls = grep {$_ ne $main::mycall} DXChannel::get_all_node_calls();
} elsif (lc $calls[0] eq 'all') {
@calls = grep {$_ ne $main::mycall && $_ ne $self->call} DXChannel::get_all_node_calls(), DXChannel::get_all_user_calls();
}
foreach $call (@calls) {
$call = uc $call;
next if $call eq $main::mycall;

View File

@ -239,6 +239,17 @@ sub get_all_nodes
return @out;
}
# return a list of node calls
sub get_all_node_calls
{
my $ref;
my @out;
foreach $ref (values %channels) {
push @out, $ref->{call} if $ref->is_node;
}
return @out;
}
# return a list of all users
sub get_all_users
{

View File

@ -11,6 +11,6 @@ use vars qw($version $subversion $build);
$version = '1.55';
$subversion = '0';
$build = '7';
$build = '8';
1;