From 27f3508edad6ddba5628ddbb50f035e343d21f98 Mon Sep 17 00:00:00 2001 From: minima Date: Tue, 9 Oct 2001 17:01:53 +0000 Subject: [PATCH] make Aliases more targeted add expunge feature to kill --- cmd/Aliases | 49 +++++++++++++++++++++++---------------------- cmd/Commands_en.hlp | 11 +++++++++- cmd/kill.pl | 8 ++++++-- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/cmd/Aliases b/cmd/Aliases index 9b4737a4..4d02e423 100644 --- a/cmd/Aliases +++ b/cmd/Aliases @@ -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' => [ ], diff --git a/cmd/Commands_en.hlp b/cmd/Commands_en.hlp index 2a7a7df7..4cf906cf 100644 --- a/cmd/Commands_en.hlp +++ b/cmd/Commands_en.hlp @@ -697,7 +697,7 @@ Best of luck - you will need it. === 5^KILL FULL [ [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); } -- 2.34.1