From: djk Date: Sat, 19 Dec 1998 23:25:09 +0000 (+0000) Subject: added set/unset isolate and unset/node (untested) X-Git-Tag: R_1_13~6 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f8cb479221e09bae8e03447c78527604cf69be4;p=spider.git added set/unset isolate and unset/node (untested) --- diff --git a/cmd/set/isolate.pl b/cmd/set/isolate.pl new file mode 100644 index 00000000..b008a9b0 --- /dev/null +++ b/cmd/set/isolate.pl @@ -0,0 +1,38 @@ +# +# set isolation for this node +# +# Please note that this is only effective if the user is not on-line +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; +my $user; +my $create; + +return (0) if $self->priv < 9; + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + push @out, $self->msg('nodee1', $call); + } else { + $user = DXUser->get($call); + $create = !$user; + $user = DXUser->new($call) if $create; + if ($user) { + $user->isolate(1); + $user->close(); + push @out, $self->msg($create ? 'isoc' : 'iso', $call); + } else { + push @out, $self->msg('e3', "Set/Isolate", $call); + } + } +} +return (1, @out); diff --git a/cmd/unset/isolate.pl b/cmd/unset/isolate.pl new file mode 100644 index 00000000..13fbf655 --- /dev/null +++ b/cmd/unset/isolate.pl @@ -0,0 +1,33 @@ +# +# set user type BACK TO 'U' (user) +# +# Please note that this is only effective if the user is not on-line +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; +my $user; +my $create; + +return (0) if $self->priv < 5; + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + push @out, $self->msg('nodee1', $call); + } else { + $user = DXUser->get($call); + return (1, $self->msg('usernf', $call)) if !$user; + $user->isolate(0); + $user->close(); + push @out, $self->msg('isou', $call); + } +} +return (1, @out); diff --git a/cmd/unset/node.pl b/cmd/unset/node.pl new file mode 100644 index 00000000..bd0a29ef --- /dev/null +++ b/cmd/unset/node.pl @@ -0,0 +1,33 @@ +# +# set user type BACK TO 'U' (user) +# +# Please note that this is only effective if the user is not on-line +# +# Copyright (c) 1998 - Dirk Koopman +# +# $Id$ +# + +my ($self, $line) = @_; +my @args = split /\s+/, $line; +my $call; +my @out; +my $user; +my $create; + +return (0) if $self->priv < 5; + +foreach $call (@args) { + $call = uc $call; + my $chan = DXChannel->get($call); + if ($chan) { + push @out, $self->msg('nodee1', $call); + } else { + $user = DXUser->get($call); + return (1, $self->msg('usernf', $call)) if !$user; + $user->sort('U'); + $user->close(); + push @out, $self->msg('nodeu', $call); + } +} +return (1, @out); diff --git a/connect/gb7tlh b/connect/gb7tlh index de20f6e1..a2834ab4 100644 --- a/connect/gb7tlh +++ b/connect/gb7tlh @@ -1,7 +1,11 @@ timeout 15 # don't forget to chmod 4775 netrom_call! -connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh -'Connect' '' -'Connect' 'cluster' -'Connect' -client gb7tlh ax25 +#connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh +#'Connect' '' +#'Connect' 'cluster' +#'Connect' +#client gb7tlh ax25 +connect telnet dirk1 +'login' 'djk' +'word' 'b390vpw' +'last' diff --git a/perl/Messages b/perl/Messages index 16ad509e..a7250016 100644 --- a/perl/Messages +++ b/perl/Messages @@ -51,6 +51,9 @@ package DXM; homenode => 'Home Node set to: $_[0]', hnodee1 => 'Please enter your Home Node, set/homenode ', hnode => 'Your Homenode is now \"$_[0]\"', + iso => '$_[0] Isolated', + isou => '$_[0] UnIsolated', + isoc => '$_[0] created and Isolated', l1 => 'Sorry $_[0], you are already logged on on another channel', l2 => 'Hello $_[0], this is $main::mycall in $main::myqth running DXSpider V$main::version', loce1 => 'Please enter your location,, set/location ', @@ -63,6 +66,7 @@ package DXM; namee2 => 'Can\'t find user $_[0]!', name => 'Your name is now \"$_[0]\"', node => '$_[0] set as AK1A style Node', + nodeu => '$_[0] set back as a User', nodec => '$_[0] created as AK1A style Node', nodee1 => 'You cannot use this command whilst your target ($_[0]) is on-line', ok => 'Operation successful',