external programs into thinking it is talking to clx.
in one step. Added load/keps to the help files
3. Updated spanish Messages
4. Improve wcy command from Stephan DK8LV's input
+5. Added set/prompt (and unset/prompt) command so that Stephan can fool some
+external programs into thinking it is talking to clx.
15Dec01=======================================================================
1. added superfluous spaces back into PC73 for the benefit of clx
14Dec01=======================================================================
This command allows the sysop to completely delete and remove a
password for a user.
+=== 0^SET/PROMPT <string>^Set your prompt to <string>
+=== 0^UNSET/PROMPT^Set your prompt back to default
+This command will set your user prompt to exactly the string that you
+say. The point of this command to enable a user to interface to programs
+that are looking for a specific prompt (or else you just want a different
+fixed prompt).
+
+ SET/PROMPT clx >
+
+UNSET/PROMPT will undo the SET/PROMPT command and set you prompt back to
+normal.
+
=== 5^SET/SPIDER <call> [<call>..]^Make the callsign an DXSpider node
Tell the system that the call(s) are to be treated as DXSpider node and
fed new style DX Protocol rather normal user commands.
--- /dev/null
+#
+# set the prompt of the user
+#
+# Copyright (c) 2001 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my $call = $self->call;
+my $user;
+
+# remove leading and trailing spaces
+$line =~ s/^\s+//;
+$line =~ s/\s+$//;
+
+return (1, $self->msg('e9')) if !$line;
+
+$user = DXUser->get_current($call);
+if ($user) {
+ $user->prompt($line);
+ $self->{prompt} = $line; # this is like this because $self->prompt is a function that does something else
+ $user->put();
+ return (1, $self->msg('prs', $line));
+} else {
+ return (1, $self->msg('namee2', $call));
+}
+
--- /dev/null
+#
+# unset the prompt of the user
+#
+# Copyright (c) 2001 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my $call = $self->call;
+my $user;
+
+$user = DXUser->get_current($call);
+if ($user) {
+ delete $user->{prompt};
+ delete $self->{prompt};
+ $user->put();
+ return (1, $self->msg('pru', $line));
+} else {
+ return (1, $self->msg('namee2', $call));
+}
+
badcount => '1,Bad Word Count',
edit => '7,Edit Function',
registered => '9,Registered?,yesno',
+ prompt => '0,Required Prompt',
);
use vars qw($VERSION $BRANCH);
$self->{logininfo} = $user->wantlogininfo;
$self->{ann_talk} = $user->wantann_talk;
$self->{here} = 1;
+ $self->{prompt} = $user->prompt if $user->prompt;
# sort out registration
if ($main::reqreg == 1) {
sub prompt
{
my $self = shift;
- $self->send($self->msg($self->here ? 'pr' : 'pr2', $self->call, cldate($main::systime), ztime($main::systime)));
+ if ($self->{prompt}) {
+ $self->send($self->{prompt});
+ } else {
+ $self->send($self->msg($self->here ? 'pr' : 'pr2', $self->call, cldate($main::systime), ztime($main::systime)));
+ }
}
# broadcast a message to all users [except those mentioned after buffer]
lastoper => '9,Last for/oper,cldatetime',
nothere => '0,Not Here Text',
registered => '9,Registered?,yesno',
+ prompt => '0,Required Prompt',
);
no strict;
'pos' => 'From Callsign: $_[0] Lat: $_[1] Long: $_[2]',
pr => '$_[0] de $main::mycall $_[1] $_[2] >',
pr2 => '($_[0]) de $main::mycall $_[1] $_[2] >',
+ prs => 'Prompt now set to \"$_[0]\"',
+ pru => 'Prompt now set back to default',
priv => 'Privilege level changed on $_[0]',
prx => '$main::mycall >',
pw0 => 'Enter old password: ',