X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fhomenode.pl;h=cf8d97154d60a0316359452bd061c0b65554380a;hb=668e4252d23e2eda2a6b234f1031e1c1a5f43d15;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6b6a8002929017b6d4217f68fa492a2d728ee1fe;p=spider.git diff --git a/cmd/set/homenode.pl b/cmd/set/homenode.pl index e69de29b..cf8d9715 100644 --- a/cmd/set/homenode.pl +++ b/cmd/set/homenode.pl @@ -0,0 +1,32 @@ +# +# set the user's home node +# +# Copyright (c) 1998 - Dirk Koopman G1TLH +# +# $Id$ +# + +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('hnodee1')) if !$line; + +$user = DXUser->get_current($call); +if ($user) { + $line = uc $line; + $user->homenode($line); + $user->put(); + my $s = DXProt::pc41($call, 4, $line); + DXProt::eph_dup($s); + DXProt::broadcast_all_ak1a($s, $DXProt::me) ; + return (1, $self->msg('hnode', $line)); +} else { + return (1, $self->msg('namee2', $call)); +} +