make Aliases more targeted
authorminima <minima>
Tue, 9 Oct 2001 17:01:53 +0000 (17:01 +0000)
committerminima <minima>
Tue, 9 Oct 2001 17:01:53 +0000 (17:01 +0000)
add expunge feature to kill

cmd/Aliases
cmd/Commands_en.hlp
cmd/kill.pl

index 9b4737a4a591d69089e09798cff010faf19f9ec5..4d02e423960fb2d9ab90337c1a3cc2c46eb8e42e 100644 (file)
@@ -26,7 +26,7 @@ package CmdAlias;
          '^\?', 'apropos', 'apropos',
        ],
     'a' => [
-       '^ac\w*$', 'apropos accept', 'apropos',
+       '^acc?e?p?t?$', 'apropos accept', 'apropos',
          '^ann\w*/full', 'announce full', 'announce', 
          '^ann\w*/sysop', 'announce sysop', 'announce',
          '^ann\w*/(.*)$', 'announce $1', 'announce',
@@ -35,11 +35,11 @@ package CmdAlias;
          '^b$', 'bye', 'bye',
        ],
        'c' => [
-       '^cl\w+$', 'apropos clear', 'apropos',
-       '^cr\w+$', 'apropos create', 'apropos',
+       '^cle?a?r?$', 'apropos clear', 'apropos',
+       '^cre?a?t?e?$', 'apropos create', 'apropos',
        ],
        'd' => [
-       '^del\w*$', 'apropos delete', 'apropos',
+       '^dele?t?e?$', 'apropos delete', 'apropos',
          '^del\w*/u', 'delete/user', 'delete/user',
          '^del\w*/fu', 'kill full', 'kill',
          '^del', 'kill', 'kill',
@@ -54,7 +54,8 @@ package CmdAlias;
          '^di\w*/(\d+)', 'directory $1', 'directory',
        ],
        'e' => [
-         '^ex', 'bye', 'bye',
+         '^exi?t?$', 'bye', 'bye',
+         '^exp?u?\w+$', 'kill expunge', 'kill expunge',
        ],
        'f' => [
        '^fo\w*$', 'apropos forward', 'apropos',
@@ -70,7 +71,7 @@ package CmdAlias;
        'k' => [
        ],
        'l' => [
-       '^lo\w*$', 'apropos load', 'apropos',
+       '^loa?d?$', 'apropos load', 'apropos',
          '^l$', 'directory', 'directory',
          '^ll$', 'directory', 'directory',
          '^ll/(\d+)', 'directory $1', 'directory',
@@ -88,7 +89,7 @@ package CmdAlias;
          '^q', 'bye', 'bye',
        ],
        'r' => [        
-       '^rej\w*$', 'apropos reject', 'apropos',
+       '^reje?c?t?$', 'apropos reject', 'apropos',
          '^r$', 'read', 'read',
          '^rcmd/(\S+)', 'rcmd $1', 'rcmd',
        ],
@@ -107,23 +108,23 @@ package CmdAlias;
          '^set/nowx', 'unset/wx', 'unset/wx',
        '^set$', 'apropos set', 'apropos',
          '^sh$', 'show', 'show',
-         '^sh\w*/u$', 'show/user', 'show/user',
-         '^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*/com', 'dbavail', 'dbavail',
-         '^sh\w*/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
-         '^sh\w*/dx/(\d+)', 'show/dx $1', 'show/dx',
-         '^sh\w*/dx/d(\d+)', 'show/dx from $1', 'show/dx',
-         '^sh\w*/newc/n', 'show/newconfiguration node', 'show/newconfiguration',
-         '^sh\w*/tnc', 'who', 'who',
-      '^sh\w*/up', 'show/cluster', 'show/cluster',
-         '^sh\w*/w\w*/(\d+)-(\d+)', 'show/wwv $1-$2', 'show/wwv',
-         '^sh\w*/w\w*/(\d+)', 'show/wwv $1', 'show/wwv',
-       '^shu\w*$', 'shutdown', 'shutdown',
-       '^sh\w*$', 'apropos show', 'apropos',
+         '^sho?w?/u$', 'show/user', 'show/user',
+         '^sho?w?/bu', 'show/files bulletins', 'show/files',
+         '^sho?w?/c/n', 'show/configuration nodes', 'show/configuration',
+         '^sho?w?/c$', 'show/configuration', 'show/configuration',
+         '^sho?w?/com', 'dbavail', 'dbavail',
+         '^sho?w?/dx/(\d+)-(\d+)', 'show/dx $1-$2', 'show/dx',
+         '^sho?w?/dx/(\d+)', 'show/dx $1', 'show/dx',
+         '^sho?w?/dx/d(\d+)', 'show/dx from $1', 'show/dx',
+         '^sho?w?/newc/n', 'show/newconfiguration node', 'show/newconfiguration',
+         '^sho?w?/tnc', 'who', 'who',
+      '^sho?w?/up', 'show/cluster', 'show/cluster',
+         '^sho?w?/ww?v?/(\d+)-(\d+)', 'show/wwv $1-$2', 'show/wwv',
+         '^sho?w?/ww?v?/(\d+)', 'show/wwv $1', 'show/wwv',
+       '^shut?d?\w*$', 'shutdown', 'shutdown',
+       '^sho?w?$', 'apropos show', 'apropos',
          '^sp$', 'send', 'send',
-       '^st\w*$', 'apropos stat', 'apropos',
+       '^sta?t?$', 'apropos stat', 'apropos',
        
     ],
        't' => [
@@ -131,7 +132,7 @@ package CmdAlias;
          '^t$', 'talk', 'talk',
        ],
        'u' => [
-       '^un\w*$', 'apropos unset', 'apropos',
+       '^uns?e?t?$', 'apropos unset', 'apropos',
        ],
        'v' => [
        ],
index 2a7a7df72437ec4fb2c24725e226685c191726f7..4cf906cfaccc06932f91243c47cc99f6f7eaba89 100644 (file)
@@ -697,7 +697,7 @@ Best of luck - you will need it.
 === 5^KILL FULL <msgno> [<msgno..]^Delete a message from the whole cluster
 Delete a message from the local system. You will only be able to
 delete messages that you have originated or been sent (unless you are
-the sysop).
+the sysop). 
 
   KILL 1234-1255
 
@@ -718,6 +718,15 @@ will delete a message (usually a 'bulletin') from the whole cluster system.
 This uses the subject field, so any messages that have exactly the
 same subject will be deleted. Beware!
 
+=== 6^KILL EXPunge <msgno> [<msgno..]^Expunge a message
+Deleting a message using the normal KILL commands only marks that message
+for deletion. The actual deletion only happens later (usually two days later).
+
+The KILL EXPUNGE command causes the message to be truly deleted more or less
+immediately.
+
+It otherwise is used in the same way as the KILL command.
+
 === 0^LINKS^Show which nodes is physically connected
 This is a quick listing that shows which links are connected and
 some information about them. See WHO for a list of all connections.
index fb90a95435756df3d6ba5bdd9327792394081d81..0dcc0d4dd8786ea0b53849b4c770f94882b9783a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # kill or delete a message
 #
-# Copyright (c) Dirk Koopman G1TLH
+# Copyright (c) 1998 Dirk Koopman G1TLH
 #
 # $Id$
 #
@@ -17,6 +17,7 @@ my $ref;
 my @refs;
 my $call = $self->call;
 my $full;
+my $expunge;
 
 # $DB::single = 1;
 
@@ -25,6 +26,9 @@ while (@f) {
        if ($f =~ /^fu/io) {
                return (1, $self->msg('e5')) if $self->priv < 5;
                $full = 1;
+       } elsif ($f =~ /^ex/io) {
+               return (1, $self->msg('e5')) if $self->priv < 6;
+               $expunge = 1;
        } elsif ($f =~ /^\d+$/o) {
                $ref = DXMsg::get($f);
                if (!$ref) {
@@ -68,7 +72,7 @@ foreach $ref ( @refs) {
        }
        my $tonode = $ref->tonode;
        $ref->stop_msg($tonode) if $tonode;
-       $ref->mark_delete;
+       $ref->mark_delete($expunge ? 0 : undef);
        push @out, $self->msg('m12', $ref->msgno);
 }