aboutsummaryrefslogtreecommitdiffstats
path: root/accesslist-duplicates.local.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'accesslist-duplicates.local.rsc')
-rw-r--r--accesslist-duplicates.local.rsc21
1 files changed, 9 insertions, 12 deletions
diff --git a/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc
index e90a002..bffee5a 100644
--- a/accesslist-duplicates.local.rsc
+++ b/accesslist-duplicates.local.rsc
@@ -19,18 +19,15 @@
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
- :foreach SeenMac in=$Seen do={
- :if ($SeenMac = $Mac && $Shown->$Mac != 1) do={
- /interface/wireless/access-list/print where mac-address=$Mac;
-
- :put "\nNumeric id to remove, any key to skip!";
- :local Remove [ :tonum [ $Read ] ];
- :if ([ :typeof $Remove ] = "num") do={
- :put ("Removing numeric id " . $Remove . "...\n");
- /interface/wireless/access-list/remove $Remove;
- }
- :set ($Shown->$Mac) 1;
+ :if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
+ /interface/wireless/access-list/print where mac-address=$Mac;
+ :put "\nNumeric id to remove, any key to skip!";
+ :local Remove [ :tonum [ $Read ] ];
+ :if ([ :typeof $Remove ] = "num") do={
+ :put ("Removing numeric id " . $Remove . "...\n");
+ /interface/wireless/access-list/remove $Remove;
}
+ :set ($Shown->$Mac) 1;
}
- :set Seen ($Seen, $Mac);
+ :set ($Seen->$Mac) 1;
}