]> scm.dxcluster.org Git - spider.git/blob - cmd/set/qth.pl
added broadcast_all_ak1a so that local commands go to isolated clusters
[spider.git] / cmd / set / qth.pl
1 #
2 # set the name of the user
3 #
4 # Copyright (c) 1998 - Dirk Koopman
5 #
6 # $Id$
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('qthe1')) if !$line;
18
19 $user = DXUser->get_current($call);
20 if ($user) {
21         $user->qth($line);
22         $user->put();
23         DXProt::broadcast_all_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me);
24         return (1, $self->msg('qth', $line));
25 } else {
26         return (1, $self->msg('namee2', $call));
27 }
28