]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:20:03 01.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 21:20:03 +0000 (00:20 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Thu, 30 Apr 2026 21:20:03 +0000 (00:20 +0300)
html/AM-GlobalFunc.rsc
html/mod/AM-TG-Notifications.rsc
html/mod/AM-TG-Notifications.rsc.diff
html/mod/notification-telegram.rsc

index 16dc1f46143146527df469efb893e31eaca330d0..a07034a7304900a61ca14c61534c4c31250773c6 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/315/84d64b90";
+:global CommitId "main/316/a9611f32";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:15:02 01.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 00:20:03 01.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;
index 951c7f121f2a1b3a6b29c479e3d1cd25fe214f63..00ab03e496476143983623831deed0652b722980 100644 (file)
@@ -6,13 +6,6 @@
 #
 # requires RouterOS, version=7.19
 # requires device-mode, fetch, scheduler
-:local ExitOK false;
-:onerror Err {
-  :global GlobalConfReady; :global GlobalFuncReady;
-  :retry { :if ($GlobalConfReady != true || $GlobalFuncReady != true) \
-      do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
-  :local ScriptName [ :jobname ];
-
 :global FlushTelegramQueue;
 :global GetTelegramChatId;
 :global NotificationFunctions;
index 4e8667d8e40f85ae5f83bc848062a47833089d2e..3cebd58288cca8433be0bfd6977c49d0671655c2 100644 (file)
@@ -1,68 +1,56 @@
-1,5c1,4
-< #!rsc by Vados
-< # RouterOS script: mod/AM-TG-Notifications
-< # Script comment: Script send Notifications in Telegram
-< # Copyright (c) 2007-2026 Vados <vados@vados.ru>
-< #
----
-> #!rsc by RouterOS
-> # RouterOS script: mod/notification-telegram
-> # Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
-> # https://rsc.eworm.de/COPYING.md
-9,14c8,10
+6a7
+> #
+9,15d9
 < :local ExitOK false;
 < :onerror Err {
 <   :global GlobalConfReady; :global GlobalFuncReady;
 <   :retry { :if ($GlobalConfReady != true || $GlobalFuncReady != true) \
 <       do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
 <   :local ScriptName [ :jobname ];
----
-> #
-> # send notifications via Telegram
-> # https://rsc.eworm.de/doc/mod/notification-telegram.md
-26a23
+< 
+26a21
 > 
-34a32
+34a30
 > 
-41a40
+41a38
 > 
-44a44
+44a42
 > 
-58a59
+58a57
 > 
-64c65
+64c63
 < :global ExitOnError; $ExitOnError $0 $Err;
 ---
 >   :global ExitOnError; $ExitOnError $0 $Err;
-69a71
+69a69
 > 
-71a74
+71a72
 > 
-75a79
+75a77
 > 
-84a89
+84a87
 > 
-86a92
+86a90
 > 
-90a97
+90a95
 > 
-97,98c104,105
+97,98c102,103
 < :global ExitOnError; $ExitOnError $0 $Err;
 < } }
 ---
 >   :global ExitOnError; $ExitOnError $0 $Err;
 > } } 
-102a110
+102a108
 > 
-112a121
+112a119
 > 
-120a130
+120a128
 > 
-124a135
+124a133
 > 
-126a138
+126a136
 > 
-137c149,153
+137c147,151
 <     :if ($Mode = "body") do={:return ("```\n" . $Text . "\n```")}
 ---
 > 
@@ -70,9 +58,9 @@
 >       :return ("```\n" . $Text . "\n```");
 >     }
 > 
-139a156
+139a154
 > 
-146,147c163,171
+146,147c161,169
 <   :if ([ :len $TokenId ] = 0 || [ :len $ChatId ] = 0) do={:return false}
 <   :if ([ :typeof $TelegramMessageIDs ] = "nothing") do={:set TelegramMessageIDs ({})}
 ---
 >     :set TelegramMessageIDs ({});
 >   }
 > 
-158c182,184
+158c180,182
 <   } else={:set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ])}
 ---
 >   } else={
 >     :set Text ($Text . [ $EscapeMD ($Notification->"message") "body" ]);
 >   }
-168a195
+168a193
 > 
-183c210,213
+183c208,211
 <     :if ([ :typeof $TelegramQueue ] = "nothing") do={:set TelegramQueue ({})}
 ---
 > 
 >     :if ([ :typeof $TelegramQueue ] = "nothing") do={
 >       :set TelegramQueue ({});
 >     }
-194a225
+194a223
 > 
-197a229
+197a227
 > 
-200a233
+200a231
 > 
-203a237
+203a235
 > 
-205,206c239,242
+205,206c237,240
 < } do={:global ExitOnError; $ExitOnError $0 $Err}
 < }
 ---
 >   :global ExitOnError; $ExitOnError $0 $Err;
 > } }
 > 
-209a246
+209a244
 > 
-210a248
+210a246
 > 
index ce9dc3f1240fc5764466c9655603057783b13713..3849958c6d721f9a643744c12fff00b55eda937c 100644 (file)
@@ -1,14 +1,11 @@
-#!rsc by RouterOS
-# RouterOS script: mod/notification-telegram
-# Copyright (c) 2013-2026 Christian Hesse <mail@eworm.de>
-# https://rsc.eworm.de/COPYING.md
+#!rsc by Vados
+# RouterOS script: mod/AM-TG-Notifications
+# Script comment: Script send Notifications in Telegram
+# Copyright (c) 2007-2026 Vados <vados@vados.ru>
+#
 #
 # requires RouterOS, version=7.19
 # requires device-mode, fetch, scheduler
-#
-# send notifications via Telegram
-# https://rsc.eworm.de/doc/mod/notification-telegram.md
-
 :global FlushTelegramQueue;
 :global GetTelegramChatId;
 :global NotificationFunctions;