aboutsummaryrefslogtreecommitdiffstats
path: root/accesslist-duplicates.capsman.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'accesslist-duplicates.capsman.rsc')
-rw-r--r--accesslist-duplicates.capsman.rsc22
1 files changed, 8 insertions, 14 deletions
diff --git a/accesslist-duplicates.capsman.rsc b/accesslist-duplicates.capsman.rsc
index 8831cc6..b5a7347 100644
--- a/accesslist-duplicates.capsman.rsc
+++ b/accesslist-duplicates.capsman.rsc
@@ -20,22 +20,16 @@
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /caps-man/access-list/get $AccList mac-address ];
:foreach SeenMac in=$Seen do={
- :if ($SeenMac = $Mac) do={
- :local Skip 0;
- :foreach ShownMac in=$Shown do={
- :if ($ShownMac = $Mac) do={ :set Skip 1; }
- }
- :if ($Skip = 0) do={
- /caps-man/access-list/print where mac-address=$Mac;
- :set Shown ($Shown, $Mac);
+ :if ($SeenMac = $Mac && $Shown->$Mac != 1) do={
+ /caps-man/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");
- /caps-man/access-list/remove $Remove;
- }
+ :put "\nNumeric id to remove, any key to skip!";
+ :local Remove [ :tonum [ $Read ] ];
+ :if ([ :typeof $Remove ] = "num") do={
+ :put ("Removing numeric id " . $Remove . "...\n");
+ /caps-man/access-list/remove $Remove;
}
+ :set ($Shown->$Mac) 1;
}
}
:set Seen ($Seen, $Mac);