mirror of
				https://github.com/eworm-de/routeros-scripts.git
				synced 2024-05-11 05:55:19 +00: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:
		@@ -15,11 +15,10 @@
 | 
			
		||||
:global Read;
 | 
			
		||||
 | 
			
		||||
:local Seen ({});
 | 
			
		||||
:local Shown ({});
 | 
			
		||||
 | 
			
		||||
: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 ];
 | 
			
		||||
  :if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
 | 
			
		||||
  :if ($Seen->$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 ] ];
 | 
			
		||||
@@ -27,7 +26,6 @@
 | 
			
		||||
      :put ("Removing numeric id " . $Remove . "...\n");
 | 
			
		||||
      /interface/wireless/access-list/remove $Remove;
 | 
			
		||||
    }
 | 
			
		||||
    :set ($Shown->$Mac) 1;
 | 
			
		||||
  }
 | 
			
		||||
  :set ($Seen->$Mac) 1;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user