mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $ScriptLock: simplify cleanup code
This commit is contained in:
@ -958,16 +958,13 @@
|
||||
|
||||
:global ScriptLockOrder;
|
||||
|
||||
:local Clean true;
|
||||
:foreach Ticket in=($ScriptLockOrder->$Script) do={
|
||||
:if ([ :typeof $Ticket ] != "nothing") do={
|
||||
:set Clean false;
|
||||
:return false;
|
||||
}
|
||||
}
|
||||
|
||||
:if ($Clean = true) do={
|
||||
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
|
||||
}
|
||||
:set ($ScriptLockOrder->$Script) [ :toarray "" ];
|
||||
}
|
||||
|
||||
:if ([ :len [ / system script find where name=$Script ] ] = 0) do={
|
||||
|
Reference in New Issue
Block a user