mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-24 21:04:28 +02:00
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:
parent
00e8766ce3
commit
ab44377fb6
4 changed files with 4 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue