got routing essentially working
[spider.git] / cmd / stat / user.pl
diff --git a/cmd/stat/user.pl b/cmd/stat/user.pl
new file mode 100644 (file)
index 0000000..997ae54
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# show either the current user or a nominated set
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @list = split /\s+/, $line;               # generate a list of callsigns
+@list = ($self->call) if !@list;  # my channel if no callsigns
+
+my $call;
+my @out;
+foreach $call (@list) {
+  $call = uc $call;
+  my $ref = DXUser->get_current($call);
+  if ($ref) {
+    @out = print_all_fields($self, $ref, "User Information $call");
+  } else {
+    push @out, "User: $call not found";
+  }
+  push @out, "" if @list > 1;
+}
+
+return (1, @out);