accesslist-duplicates: remove extra check

Why did we have that? Possibly for performance? Well, should not be a
problem now.
This commit is contained in:
Christian Hesse 2023-10-17 00:01:38 +02:00
parent 00e8766ce3
commit ab44377fb6
4 changed files with 4 additions and 12 deletions

View file

@ -15,11 +15,10 @@
:global Read;
:local Seen ({});
:local Shown ({});
: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 ];
:if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
:if ($Seen->$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 ] ];
@ -27,7 +26,6 @@
:put ("Removing numeric id " . $Remove . "...\n");
/caps-man/access-list/remove $Remove;
}
:set ($Shown->$Mac) 1;
}
:set ($Seen->$Mac) 1;
}