aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--accesslist-duplicates.capsman6
-rw-r--r--accesslist-duplicates.local6
-rw-r--r--accesslist-duplicates.template6
3 files changed, 12 insertions, 6 deletions
diff --git a/accesslist-duplicates.capsman b/accesslist-duplicates.capsman
index 5fcf6ae..3992991 100644
--- a/accesslist-duplicates.capsman
+++ b/accesslist-duplicates.capsman
@@ -12,6 +12,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local Read do={ :return; }
+
:local Seen [ :toarray "" ];
:local Shown [ :toarray "" ];
@@ -28,8 +30,8 @@
:set Shown ($Shown, $Mac);
:put "\nNumeric id to remove, any key to skip!";
- :local Remove ([ :terminal inkey ] - 48);
- :if ($Remove >= 0 && $Remove <= 9) do={
+ :local Remove [ :tonum [ $Read ] ];
+ :if ([ :typeof $Remove ] = "num") do={
:put ("Removing numeric id " . $Remove . "...\n");
/ caps-man access-list remove $Remove;
}
diff --git a/accesslist-duplicates.local b/accesslist-duplicates.local
index 4d058d4..cb2e7c3 100644
--- a/accesslist-duplicates.local
+++ b/accesslist-duplicates.local
@@ -12,6 +12,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local Read do={ :return; }
+
:local Seen [ :toarray "" ];
:local Shown [ :toarray "" ];
@@ -28,8 +30,8 @@
:set Shown ($Shown, $Mac);
:put "\nNumeric id to remove, any key to skip!";
- :local Remove ([ :terminal inkey ] - 48);
- :if ($Remove >= 0 && $Remove <= 9) do={
+ :local Remove [ :tonum [ $Read ] ];
+ :if ([ :typeof $Remove ] = "num") do={
:put ("Removing numeric id " . $Remove . "...\n");
/ interface wireless access-list remove $Remove;
}
diff --git a/accesslist-duplicates.template b/accesslist-duplicates.template
index 8878bcc..25923e1 100644
--- a/accesslist-duplicates.template
+++ b/accesslist-duplicates.template
@@ -13,6 +13,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
+:local Read do={ :return; }
+
:local Seen [ :toarray "" ];
:local Shown [ :toarray "" ];
@@ -29,8 +31,8 @@
:set Shown ($Shown, $Mac);
:put "\nNumeric id to remove, any key to skip!";
- :local Remove ([ :terminal inkey ] - 48);
- :if ($Remove >= 0 && $Remove <= 9) do={
+ :local Remove [ :tonum [ $Read ] ];
+ :if ([ :typeof $Remove ] = "num") do={
:put ("Removing numeric id " . $Remove . "...\n");
/ %PATH% access-list remove $Remove;
}