summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-04-24 10:35:54 +0000
committerPeter Palfrader <peter@palfrader.org>2004-04-24 10:35:54 +0000
commit54452b9931d8bc255b5706dbeade6432dd28e317 (patch)
tree86e3349517304b325bb3d7c454b476b538a32336
parentb77e9231dedf5db58e9428314a7fe836becc00c9 (diff)
Accept show=, ping=, and fetchit= in addition to their real names in set
-rw-r--r--NEWS2
-rwxr-xr-xpingd11
2 files changed, 11 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index a19db11..e5b584a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
Changes in version - 2004
* Have new disable and enable commands which are shortcut
for set pingit=off showit=off fetch=off and =on respectively.
+ * Accept show=, ping=, and fetchit= in addition to their real
+ names in set.
Changes in version 2.1.3 - 2004-04-20
* Improvements to pingd.conf(5) by Colin.
diff --git a/pingd b/pingd
index 8c4dcbf..8b2824b 100755
--- a/pingd
+++ b/pingd
@@ -405,8 +405,15 @@ sub command_set(@) {
my @argv = @_;
my @settings;
- while (scalar @argv && $argv[0] =~ /^(showit|pingit|fetch)=(on|off)$/) {
- push @settings, $argv[0];
+ while (scalar @argv && $argv[0] =~ /^(show(?:it)?|ping(?:it)?|fetch(?:it))=(on|off)$/) {
+ $name = $1;
+ $value = $2;
+
+ $name = 'showit' if ($name eq 'show');
+ $name = 'pingit' if ($name eq 'ping');
+ $name = 'fetch' if ($name eq 'fetchit');
+
+ push @settings, "$name=$value";
shift @argv;
};