added who command
authordjk <djk>
Tue, 25 May 1999 13:21:40 +0000 (13:21 +0000)
committerdjk <djk>
Tue, 25 May 1999 13:21:40 +0000 (13:21 +0000)
Changes
cmd/Aliases
cmd/who.pl [new file with mode: 0644]

diff --git a/Changes b/Changes
index 4b6cefaa8b02cdf19cfa1a48e1a64a20933b95e9..9ea91d1a0fbeb058042f04e6e215f30f00ee1c64 100644 (file)
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@
 2. got rid of the stupid bug that failed to print out the offline message
 but put a "*main::STDOUTmain" for every line of that message instead.
 3. Ported to 5.00503 (well actually just installed it and it just runs). 
+4. Added who command
 23May99=======================================================================
 1. Got rid of some of the useless error messages on global destruction when
 quiting a program.
index 3aaddb28318b2a249aba6f4816572e19225d95cc..9c5094e4c6def5efb679840b3229c185198d3b77 100644 (file)
@@ -36,7 +36,7 @@ package CmdAlias;
        ],
        'd' => [
          '^del', 'kill', 'kill',
-         '^del.*/fu', 'kill full', 'kill',
+         '^del\w*/fu', 'kill full', 'kill',
          '^di\w*/a\w*', 'directory all', 'directory',
          '^di\w*/b\w*', 'directory bulletins', 'directory',
          '^di\w*/n\w*', 'directory new', 'directory',
@@ -91,6 +91,7 @@ package CmdAlias;
          '^set/noww', 'unset/wwv', 'unset/wwv',
          '^set/nowx', 'unset/wx', 'unset/wx',
          '^sh$', 'show', 'show',
+         '^sh\w*/bu', 'show/files bulletins', 'show/files',
          '^sh\w*/c/n', 'show/configuration nodes', 'show/configuration',
          '^sh\w*/c$', 'show/configuration', 'show/configuration',
          '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
diff --git a/cmd/who.pl b/cmd/who.pl
new file mode 100644 (file)
index 0000000..34e2d0a
--- /dev/null
@@ -0,0 +1,24 @@
+#
+# who : is online
+# a complete list of stations connected
+#
+# Copyright (c) 1999 Dirk Koopman G1TLH
+#
+# $Id$
+
+
+my $self = shift;
+my $dxchan;
+my @out;
+
+push @out, "  Callsign Type Started           Name";
+
+foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) {
+    my $call = $dxchan->call();
+       my $t = cldatetime($dxchan->user->lastin);
+       my $sort = $dxchan->is_ak1a() ? "NODE" : "USER";
+       my $name = $dxchan->user->name;
+       push @out, sprintf "%10s $sort $t $name", $call;
+}
+
+return (1, @out)