added set/password R_1_14
authordjk <djk>
Tue, 22 Dec 1998 00:52:54 +0000 (00:52 +0000)
committerdjk <djk>
Tue, 22 Dec 1998 00:52:54 +0000 (00:52 +0000)
added brackets for nohere

Changes
cmd/set/password.pl
perl/DXCommandmode.pm
perl/Messages

diff --git a/Changes b/Changes
index 58f0b328483887f62da12b4db0e9b408bc7a3a0c..8b4c925d46f8a6b3b15992a62865a3d07ab20021 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+22Dec98========================================================================
+1. Added brackets round callsign if not here for prompt
+2. Added Iain's set/password routine
 21Dec98============= late! ====================================================
 1. fixed problem with missing DXDebug in DXProt.
 2. Fixed DXDebug so that it actually works as advertised with and without 
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b408278df2356b12da3a7c2b4571e7e3bfe99712 100644 (file)
@@ -0,0 +1,30 @@
+#
+# set a user's password
+#
+# Copyright (c) 1998 Iain Phillips G0RDI
+# 21-Dec-1998
+#
+# Syntax:      set/pass <password> <callsign>
+#
+
+my ($self, $line) = @_;
+my @args = split /\s+/, $line;
+my $call;
+my $pass = shift @args;
+my @out;
+my $user;
+my $ref;
+
+return (1, $self->msg('e5')) if $self->priv < 9;
+
+foreach $call (@args) {
+       $call = uc $call;
+       if ($ref = DXUser->get_current($call)) {
+               $ref->passwd($pass);
+               $ref->put();
+               push @out, $self->msg("password", $call);
+       } else {
+               push @out, $self->msg('e3', 'User record for', $call);
+       }
+}
+return (1, @out);
index da449f72c8bea36d17702f1c8b6cb75b2a642ecc..e429654c3de92d592955f5da5623ff58564b3383 100644 (file)
@@ -290,9 +290,7 @@ sub finish
 sub prompt
 {
        my $self = shift;
-       my $call = $self->{call};
-       $self->send($self->msg('pr', $call));
-       #DXChannel::msg($self, 'pr', $call);
+       $self->send($self->msg($self->here ? 'pr' : 'pr2', $self->call));
 }
 
 # broadcast a message to all users [except those mentioned after buffer]
index e43667bf14c7f2d680bc6960679bdf57848c77aa..cd4b12ab8b6f84697f2b585f1f28bfecc61e5342 100644 (file)
@@ -76,9 +76,12 @@ package DXM;
                                ok => 'Operation successful',
                                page => 'Press Enter to continue, A to abort ($_[0] lines) >',
                                pagelth => 'Page Length is now $_[0]',
+                               passerr => 'Please use: SET/PASS <password> <callsign>',
+                               password => 'Password set or changed for $_[0]',
                                pingo => 'Ping Started to $_[0]',
                                pingi => 'Ping Returned from $_[0] ($_[2] secs)',
                                pr => '$_[0] de $main::mycall $main::cldate $main::ztime >',
+                               pr2 => '($_[0]) de $main::mycall $main::cldate $main::ztime >',
                                priv => 'Privilege level changed on $_[0]',
                                prx => '$main::mycall >',
                                qll => 'Please enter your location with set/location or set/qra',