mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
dhcp-lease-comment: simplify array access
This commit is contained in:
parent
07973066c9
commit
cedc178595
3 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@
|
|||
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
|
||||
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
|
||||
:local NewComment;
|
||||
:local AccessList [ :pick [ / caps-man access-list find where mac-address=$MacAddress ] 0 ];
|
||||
:local AccessList ([ / caps-man access-list find where mac-address=$MacAddress ]->0);
|
||||
:if ([ :len $AccessList ] > 0) do={
|
||||
:set NewComment [ / caps-man access-list get $AccessList comment ];
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
|
||||
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
|
||||
:local NewComment;
|
||||
:local AccessList [ :pick [ / interface wireless access-list find where mac-address=$MacAddress ] 0 ];
|
||||
:local AccessList ([ / interface wireless access-list find where mac-address=$MacAddress ]->0);
|
||||
:if ([ :len $AccessList ] > 0) do={
|
||||
:set NewComment [ / interface wireless access-list get $AccessList comment ];
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
:local MacAddress [ / ip dhcp-server lease get $Lease mac-address ];
|
||||
:local OldComment [ / ip dhcp-server lease get $Lease comment ];
|
||||
:local NewComment;
|
||||
:local AccessList [ :pick [ / %PATH% access-list find where mac-address=$MacAddress ] 0 ];
|
||||
:local AccessList ([ / %PATH% access-list find where mac-address=$MacAddress ]->0);
|
||||
:if ([ :len $AccessList ] > 0) do={
|
||||
:set NewComment [ / %PATH% access-list get $AccessList comment ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue