X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fqth.pl;h=90d784e14ffc9cf936eb56574068826911b4a10d;hb=b4826d1f4125788e14fed3adbb99e66242904e74;hp=93407a2a76899d2680119b6a4b409da404e8e75e;hpb=43ac48b5c2aecc7fe27af95d4b613b8d2dd08761;p=spider.git diff --git a/cmd/set/qth.pl b/cmd/set/qth.pl index 93407a2a..90d784e1 100644 --- a/cmd/set/qth.pl +++ b/cmd/set/qth.pl @@ -1,8 +1,28 @@ # -# set the qth field +# set the name of the user +# +# Copyright (c) 1998 - Dirk Koopman # # $Id$ # -my ($self, $args) = @_; -my $user = $self->user; -return (1, "qth is now ", $user->qth($args)); + +my ($self, $line) = @_; +my $call = $self->call; +my $user; + +# remove leading and trailing spaces +$line =~ s/^\s+//; +$line =~ s/\s+$//; + +return (1, $self->msg('qthe1')) if !$line; + +$user = DXUser->get_current($call); +if ($user) { + $user->qth($line); + $user->put(); + DXProt::broadcast_ak1a(DXProt::pc41($call, 2, $line), $DXProt::me); + return (1, $self->msg('qth', $line)); +} else { + return (1, $self->msg('namee2', $call)); +} +