Change DXUser->get* to DXUser::get*
[spider.git] / cmd / set / prompt.pl
1 #
2 # set the prompt of the user
3 #
4 # Copyright (c) 2001 - Dirk Koopman
5 #
6 #
7 #
8
9 my ($self, $line) = @_;
10 my $call = $self->call;
11 my $user;
12
13 # remove leading and trailing spaces
14 $line =~ s/^\s+//;
15 $line =~ s/\s+$//;
16
17 return (1, $self->msg('e9')) if !$line;
18
19 $user = DXUser::get_current($call);
20 if ($user) {
21         $user->prompt($line);
22         $self->{prompt} = $line;    # this is like this because $self->prompt is a function that does something else
23         $user->put();
24         return (1, $self->msg('prs', $line));
25 } else {
26         return (1, $self->msg('namee2', $call));
27 }
28