X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fqth.pl;h=2b696f94c29d05064ca9f4ce90646bd94a43a405;hb=668e4252d23e2eda2a6b234f1031e1c1a5f43d15;hp=93407a2a76899d2680119b6a4b409da404e8e75e;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/qth.pl b/cmd/set/qth.pl index 93407a2a..2b696f94 100644 --- a/cmd/set/qth.pl +++ b/cmd/set/qth.pl @@ -1,8 +1,31 @@ # -# 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+$//; +$line =~ s/[{}]//g; # no braces allowed + +return (1, $self->msg('qthe1')) if !$line; + +$user = DXUser->get_current($call); +if ($user) { + $user->qth($line); + $user->put(); + my $s = DXProt::pc41($call, 2, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; + return (1, $self->msg('qth', $line)); +} else { + return (1, $self->msg('namee2', $call)); +} +