mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
collect-wireless-mac: simplify array access
This commit is contained in:
parent
cedc178595
commit
1ca1b48bcd
3 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
:foreach RegTbl in=[ / caps-man registration-table find ] do={
|
||||
:local Mac [ / caps-man registration-table get $RegTbl mac-address ];
|
||||
:local AccessList [ :pick [ / caps-man access-list find where mac-address=$Mac ] 0 ];
|
||||
:local AccessList ([ / caps-man access-list find where mac-address=$Mac ]->0);
|
||||
:if ([ :len $AccessList ] = 0) do={
|
||||
:local HostName "no dhcp lease";
|
||||
:local Address "no dhcp lease";
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
:foreach RegTbl in=[ / interface wireless registration-table find ] do={
|
||||
:local Mac [ / interface wireless registration-table get $RegTbl mac-address ];
|
||||
:local AccessList [ :pick [ / interface wireless access-list find where mac-address=$Mac ] 0 ];
|
||||
:local AccessList ([ / interface wireless access-list find where mac-address=$Mac ]->0);
|
||||
:if ([ :len $AccessList ] = 0) do={
|
||||
:local HostName "no dhcp lease";
|
||||
:local Address "no dhcp lease";
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
:foreach RegTbl in=[ / %PATH% registration-table find ] do={
|
||||
:local Mac [ / %PATH% registration-table get $RegTbl mac-address ];
|
||||
:local AccessList [ :pick [ / %PATH% access-list find where mac-address=$Mac ] 0 ];
|
||||
:local AccessList ([ / %PATH% access-list find where mac-address=$Mac ]->0);
|
||||
:if ([ :len $AccessList ] = 0) do={
|
||||
:local HostName "no dhcp lease";
|
||||
:local Address "no dhcp lease";
|
||||
|
|
Loading…
Reference in a new issue