nailed set/unset parameters in user file
[spider.git] / cmd / unset / announce.pl
index cf750e2572eefd24c752d3d8537b15f2612432cf..2c4ebd30883aa7c5894e6edb3b605b51e7ecc4e8 100644 (file)
@@ -1,5 +1,5 @@
 #
-# unset the announce flag
+# set the announce flag
 #
 # Copyright (c) 1998 - Dirk Koopman
 #
@@ -15,12 +15,13 @@ my @out;
 
 foreach $call (@args) {
   $call = uc $call;
-  my $user = ($call eq $self->call) ? $self->user :  DXUser->get($call);
-  if ($user) {
-    $user->ann(0);
-       push @out, DXM::msg('annu', $call);
+  my $chan = DXChannel->get($call);
+  if ($chan) {
+    $chan->ann(0);
+       $chan->user->wantann(0);
+       push @out, $self->msg('annu', $call);
   } else {
-    push @out, DXM::msg('e3', "Unset Announce", $call);
+    push @out, $self->msg('e3', "Unset Announce", $call);
   }
 }
 return (1, @out);