]> dxcluster.net Git - spider.git/commitdiff
add route_node and route_user commands
authorminima <minima>
Wed, 6 Jun 2001 13:31:22 +0000 (13:31 +0000)
committerminima <minima>
Wed, 6 Jun 2001 13:31:22 +0000 (13:31 +0000)
cmd/stat/route_node.pl [new file with mode: 0644]
cmd/stat/route_user.pl [new file with mode: 0644]

diff --git a/cmd/stat/route_node.pl b/cmd/stat/route_node.pl
new file mode 100644 (file)
index 0000000..1cedcb4
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# show a Route::Node thingy
+#
+# Copyright (c) 2001 Dirk Koopman G1TLH
+#
+# $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 = Route::Node::get($call);
+  if ($ref) {
+    @out = print_all_fields($self, $ref, "Route::Node Information $call");
+  } else {
+    push @out, "Route::User: $call not found";
+  }
+  push @out, "" if @list > 1;
+}
+
+return (1, @out);
diff --git a/cmd/stat/route_user.pl b/cmd/stat/route_user.pl
new file mode 100644 (file)
index 0000000..37a079b
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# show a Route::User thingy
+#
+# Copyright (c) 2001 Dirk Koopman G1TLH
+#
+# $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 = Route::User::get($call);
+  if ($ref) {
+    @out = print_all_fields($self, $ref, "Route::User Information $call");
+  } else {
+    push @out, "Route::User: $call not found";
+  }
+  push @out, "" if @list > 1;
+}
+
+return (1, @out);