+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
+#
+# 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);
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]
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',