]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 21:00:04 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 18:00:04 +0000 (21:00 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 18:00:04 +0000 (21:00 +0300)
html/AM-FwAddrLists.rsc
html/AM-GlobalFunc.rsc

index 42e3422a0ef2bd22bba3f8b991fc3a1399ea39a7..4780dd004cd1eba216677e7321e9c2bc6f92dc19 100644 (file)
       :log debug ($ScriptName . " Downloaded " . [ $HumanReadableNum [ :len $Data ] 1024 ] . "B for list '" . $ListName . "' from: " . $ListUrl);
     }
 
-      :foreach Line in=[ :deserialize $Data delimiter="\n" from=dsv options=dsv.plain ] do={
-        :set Line ($Line->0);
-        :local Address;
-        :if ([ :pick $Line 0 1 ] = "{" && [ :pick $Line ([ :len $Line ] - 1) ] = "}") do={
-          :do {
-            :set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ];
-          } on-error={ }
-        } else={
+    :foreach Line in=[ :deserialize $Data delimiter="\n" from=dsv options=dsv.plain ] do={
+      :set Line ($Line->0);
+      :local Delim [ $FindDelim $Line ];
+      :if ($Delim = 0) do={ :set Line ""; };
+      :if ([ :len $Line ] = 0) do={
+      :do {
+        :log info ($ScriptName . " address-list entry: " . $Line . " is empty, or commented. Skipped.");        
+      } on-error={ }
+      }
+      :local Address;
+      :if ([ :pick $Line 0 1 ] = "{" && [ :pick $Line ([ :len $Line ] - 1) ] = "}") do={
+        :do {
+          :set Address [ :tostr ([ :deserialize from=json $Line ]->"cidr") ];
+        } on-error={ }
+      } else={
           :set Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr"));
-        }
+      }
+      :do {
         :local Branch;
         :if ($Address ~ "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2})?\$") do={
           :local Net $Address;
index 48fd8b87c242c3ceb0b0f4e0e8dcd8e71ab784cb..93a4cb81e83bbae95a8711f715fe35108677c84f 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/595/68134d5d";
+:global CommitId "main/596/174566ea";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 20:50:02 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 21:00:04 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;