We have lift off, we are CONNECTED. We aren't doing much but we can
[spider.git] / cmd / set / address.pl
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f5922d9c31e53cd8b177020576025ff50e22c239 100644 (file)
@@ -0,0 +1,27 @@
+#
+# set the address field
+#
+# Copyright (c) 1998 - Dirk Koopman
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my $call;
+my @out;
+my $user;
+
+if ($self->priv >= 5) {             # allow a callsign as first arg
+  my @args = split /\s+/, $line;
+  $call = UC $args[0];
+  $user = DXUser->get_current($call);
+  shift @args if $user;
+  $line = join ' ', @args;
+} else {
+  $user = $self->user;
+}
+
+$user->addr($line);
+push @out, DXM::msg('addr', $call);
+
+return (1, @out);