X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fset%2Fhomenode.pl;h=f2f8e6e7cbe7e432fec918ba25fea6b325d29f82;hb=bcf3a91dcafdb63c46120cae5dec6a105edcfcf1;hp=d85c893229cecd36da68707a5b024231cc5c9677;hpb=b4826d1f4125788e14fed3adbb99e66242904e74;p=spider.git diff --git a/cmd/set/homenode.pl b/cmd/set/homenode.pl index d85c8932..f2f8e6e7 100644 --- a/cmd/set/homenode.pl +++ b/cmd/set/homenode.pl @@ -3,7 +3,7 @@ # # Copyright (c) 1998 - Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; @@ -13,15 +13,20 @@ 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); +$user = DXUser::get_current($call); if ($user) { - $line = uc $line; - $user->homenode($line); - $user->put(); - DXProt::broadcast_ak1a(DXProt::pc41($call, 4, $line), $DXProt::me); + $line = uc unpad($line); + if ($user->homenode && $line ne $user->homenode) { + $user->homenode($line); + $user->put(); + my $s = DXProt::pc41($call, 4, $line); + DXProt::eph_dup($s); + DXChannel::broadcast_all_nodes($s, $main::me); + } return (1, $self->msg('hnode', $line)); } else { return (1, $self->msg('namee2', $call));