Compare commits

..

104 commits

Author SHA1 Message Date
Christian Hesse
9d7b4157d6 Merge branch 'dhcp-to-dns' into next 2026-05-20 09:16:45 +02:00
Christian Hesse
0aac905859 bump required RouterOS version for all scripts 2026-05-20 09:16:45 +02:00
Christian Hesse
90b1e03302 dhcp-to-dns: allow to ignore for specific lease 2026-05-20 09:16:45 +02:00
Christian Hesse
0d84272ee9 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-05-20 09:16:45 +02:00
Christian Hesse
5a138ba18f update list of contributors 2026-05-20 09:16:45 +02:00
Christian Hesse
09389ee857 Merge branch 'break-in-loop' into next 2026-05-20 09:16:45 +02:00
Łukasz Witkowski
8dd3a5ab84 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.
2026-05-20 09:16:45 +02:00
Christian Hesse
1d46786a69 Merge branch 'continue-in-loop' into next 2026-05-20 09:16:45 +02:00
Christian Hesse
0360b0484d telegram-chat: fix indention 2026-05-20 09:16:45 +02:00
Łukasz Witkowski
d79da00eca dhcp-to-dns: set $LeaseInfo 2026-05-20 09:16:45 +02:00
Christian Hesse
a4704e1369 Merge branch 'early-exit-with-exit' into next 2026-05-20 09:16:45 +02:00
Christian Hesse
b5527ef1a0 dhcp-to-dns: fix indention 2026-05-20 09:16:45 +02:00
Christian Hesse
a15f0d89f6 telegram-chat: use :break in loop 2026-05-20 09:16:45 +02:00
Łukasz Witkowski
bad16e3625 dhcp-to-dns: convert DNS names to lower case 2026-05-20 09:16:45 +02:00
Christian Hesse
59d195254d global-functions: deprecate $ExitError 2026-05-20 09:16:45 +02:00
Christian Hesse
ac7330ed96 dhcp-to-dns: use another :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
c1b29e61e2 check-certificates: use :break in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
0c38242f9c dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-05-20 09:16:45 +02:00
Christian Hesse
a30fab1d1d update-tunnelbroker: early exit with :exit 2026-05-20 09:16:45 +02:00
Christian Hesse
36b8be7204 dhcp-to-dns: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
70596943e0 update-gre-address: early exit with :exit 2026-05-20 09:16:45 +02:00
Christian Hesse
467c2dba95 telegram-chat: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
b5538eba39 telegram-chat: early exit with :exit 2026-05-20 09:16:45 +02:00
Christian Hesse
0c9533c4f4 netwatch-dns: fix indention 2026-05-20 09:16:45 +02:00
Christian Hesse
ff6a0a301d sms-forward: early exit with :exit 2026-05-20 09:16:45 +02:00
Christian Hesse
e68a6e55ed netwatch-dns: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
4590790aa1 netwatch-dns: fix indention 2026-05-20 09:16:45 +02:00
Christian Hesse
8bc9dd1fd6 netwatch-dns: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
43a09049d7 global-functions: $ScriptInstallUpdate: fix indention 2026-05-20 09:16:45 +02:00
Christian Hesse
32f8c7f57a global-functions: $ScriptInstallUpdate: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
1eaf866f03 global-functions: $CleanName: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
aadc06545d fw-addr-lists: fix indention 2026-05-20 09:16:45 +02:00
Christian Hesse
c0033d6969 fw-addr-lists: use :continue in loop 2026-05-20 09:16:45 +02:00
Christian Hesse
d1e3bc8cbc Merge branch 'compare-ids' into next 2026-05-20 09:16:44 +02:00
Christian Hesse
f64aa260ce sms-action: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
9911c8a0be Merge branch 'html-class-shadow' into next 2026-05-20 09:16:44 +02:00
Christian Hesse
71c0a8f288 global-functions: deprecate $HexToNum 2026-05-20 09:16:44 +02:00
Christian Hesse
93ebc2f6a9 ppp-on-up: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
d08f01c5d3 contrib/logo-color: add class (and shadow) for screenshots 2026-05-20 09:16:44 +02:00
Christian Hesse
3e380a0d6a log-forward: fix indention 2026-05-20 09:16:44 +02:00
Christian Hesse
9df63ea966 packages-update: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
9bc9238598 contrib/html: support any class name from image alt text 2026-05-20 09:16:44 +02:00
Christian Hesse
f00145405c log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.

Initializing $LogForwardLast with boolean value looks odd, but this is
required to match the very first message.
2026-05-20 09:16:44 +02:00
Christian Hesse
8efef50b29 ospf-to-leds: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
16223b7a03 general/style: add shadow for code blocks 2026-05-20 09:16:44 +02:00
Christian Hesse
624b91d317 netwatch-notify: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
024405c43d contrib/html: add class and shadow for screenshots 2026-05-20 09:16:44 +02:00
Christian Hesse
3823a4a444 netwatch-dns: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
ac28f5661a contrib/html: add a class and shadow for notifications 2026-05-20 09:16:44 +02:00
Christian Hesse
882bbb70f5 log-forward: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
1c15667b7b doc/telegram-chat: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
bf6d987626 ipv6-update: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
e1e98bee69 doc/sms-forward: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
e93a9da3bb ipsec-to-dns: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
5fe68bc79c doc/netwatch-notify: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
27c22de25f hotspot-to-wpa-cleanup: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
9010282a71 doc/mod/scriptrunonce: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
0bdf4edf8d hotspot-to-wpa: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
304c936323 doc/mod/notification-telegram: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
bc630d8cb8 gps-track: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
643389672f doc/mod/notification-matrix: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
b82ed851b9 fw-addr-lists: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
f850e71c27 doc/mod/notification-gotify: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
f5942a06e2 firmware-upgrade-reboot: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
3bd101472d doc/mod/ipcalc: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
440a30c88f dhcpv6-client-lease: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
e002259ecb doc/mod/inspectvar: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
0391a50c85 dhcpv4-server-lease: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
dd39f8022b doc/log-forward: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
cbe47b6400 dhcp-to-dns: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
834f32e70b doc/daily-psk: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
407f792157 dhcp-lease-comment: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
85c26f26e6 doc/collect-wireless-mac: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
f9e2dbc751 daily-psk: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
9dc23f80af doc/check-routeros-update: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
fd791e9e0a collect-wireless-mac: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
0470f51e29 doc/check-perpetual-license: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
5ca09e23c0 check-routeros-update: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
52a8d19def doc/check-lte-firmware-upgrade: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
600e94aada check-perpetual-license: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
801f56377d doc/check-health: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
cf2997dea3 check-lte-firmware-upgrade: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
0b860e46a6 doc/check-certificates: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
8cf1bbdfed check-health: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
ff3e565991 doc/backup-upload: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
4ae413c993 check-certificates: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
f30b560c1b doc/backup-cloud: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
f088493d02 certificate-renew-issued: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
88edc82b06 README: start image alt text with 'notification:' or 'screenshot:' 2026-05-20 09:16:44 +02:00
Christian Hesse
09da0debe0 capsman-rolling-upgrade: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
b2db005f6f contrib/html: give the head table a class 2026-05-20 09:16:44 +02:00
Christian Hesse
c0ba366c9e capsman-download-packages: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
2589115f50 contrib/html: enclose content in span tag with class 2026-05-20 09:16:44 +02:00
Christian Hesse
87ce3b8e5c backup-upload: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
602b331376 backup-partition: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
04181c8131 backup-email: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
5d5dc2fc3e backup-cloud: early exit with :exit 2026-05-20 09:16:44 +02:00
Christian Hesse
d0588231f6 Merge branch 'convert-to-url' into next 2026-05-20 09:16:39 +02:00
Christian Hesse
2c5b708f88 global-functions: deprecate $UrlEncode 2026-05-20 09:04:52 +02:00
Christian Hesse
3cdcd24428 mod/notification-telegram: use :convert for url-encoding 2026-05-20 09:02:13 +02:00
Christian Hesse
ef3edd3b3d mod/notification-ntfy: use :convert for url-encoding 2026-05-20 09:01:16 +02:00
Christian Hesse
7dd3c86fe0 mod/notification-matrix: use :convert for url-encoding 2026-05-20 09:00:33 +02:00
Christian Hesse
f380d0ae66 daily-psk: use :convert for url-encoding 2026-05-20 08:59:25 +02:00
Christian Hesse
332b91e75d check-certificates: use :convert for url-encoding 2026-05-20 08:58:22 +02:00
11 changed files with 42 additions and 51 deletions

View file

@ -29,7 +29,6 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitFullyConnected;
:local CheckCertificatesDownloadImport do={
@ -45,11 +44,10 @@
:global FetchUserAgentStr;
:global LogPrint;
:global RmFile;
:global UrlEncode;
:global WaitForFile;
:foreach Type in={ "p12"; "pem" } do={
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
:local CertFileName ([ :convert to=url $FetchName ] . "." . $Type);
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
"' (file '" . $CertFileName . "')...");
@ -200,7 +198,7 @@
} else={
$LogPrint debug $ScriptName ("Certificate '" . $CertVal->"name" . "' was not updated, but replaced.");
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ $UrlEncode $FetchName ] ] . "\\.(p12|pem)_[0-9]+\$") \
:local CertNew [ /certificate/find where name~("^" . [ $EscapeForRegEx [ :convert to=url $FetchName ] ] . "\\.(p12|pem)_[0-9]+\$") \
(common-name=($CertVal->"common-name") or subject-alt-name~("(^|\\W)(DNS|IP):" . [ $EscapeForRegEx $LastName ] . "(\\W|\$)")) \
fingerprint!=[ :tostr ($CertVal->"fingerprint") ] ];
:local CertNewVal [ /certificate/get $CertNew ];

View file

@ -26,7 +26,6 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -76,7 +75,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -26,7 +26,6 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -75,7 +74,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -27,7 +27,6 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -91,7 +90,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -26,7 +26,6 @@
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
:global UrlEncode;
:global WaitForFile;
:global WaitFullyConnected;
@ -76,7 +75,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={
:local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]);
"?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -43,10 +43,10 @@ hr {
clear: both;
}
img.notification {
box-shadow: 5px 5px 7px gray;
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
}
img.screenshot {
box-shadow: 5px 5px 7px gray;
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
}
img.logo {
float: left;
@ -72,7 +72,7 @@ pre {
pre.code {
background-color: #f8f8f8;
border: 1px solid #ccc;
box-shadow: 5px 5px 7px gray;
box-shadow: 3px 3px 7px rgba(100,100,100,0.7);
overflow: auto;
padding: 6px 10px;
border-radius: 3px;

View file

@ -10,6 +10,7 @@
:global ExitError;
:global HexToNum;
:global UrlEncode;
# wrapper for $ExitOnError with additional parameter
:set ExitError do={
@ -36,3 +37,30 @@
:return [ :tonum ("0x" . $Input) ];
}
# url encoding
:set UrlEncode do={
:local Input [ :tostr $1 ];
:if ([ :len $Input ] = 0) do={
:return "";
}
:local Return "";
:local Chars ("\n\r !\"#\$%&'()*+,:;<=>?@[\\]^`{|}~");
:local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F";
"%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" };
:for I from=0 to=([ :len $Input ] - 1) do={
:local Char [ :pick $Input $I ];
:local Replace [ :find $Chars $Char ];
:if ([ :typeof $Replace ] = "num") do={
:set Char ($Subs->$Replace);
}
:set Return ($Return . $Char);
}
:return $Return;
}

View file

@ -80,7 +80,6 @@
:global SymbolByUnicodeName;
:global SymbolForNotification;
:global Unix2Dos;
:global UrlEncode;
:global ValidateSyntax;
:global VersionToNum;
:global WaitDefaultRouteReachable;
@ -1737,33 +1736,6 @@
:return [ :tocrlf [ :tostr $1 ] ];
}
# url encoding
:set UrlEncode do={
:local Input [ :tostr $1 ];
:if ([ :len $Input ] = 0) do={
:return "";
}
:local Return "";
:local Chars ("\n\r !\"#\$%&'()*+,:;<=>?@[\\]^`{|}~");
:local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27";
"%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F";
"%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" };
:for I from=0 to=([ :len $Input ] - 1) do={
:local Char [ :pick $Input $I ];
:local Replace [ :find $Chars $Char ];
:if ([ :typeof $Replace ] = "num") do={
:set Char ($Subs->$Replace);
}
:set Return ($Return . $Char);
}
:return $Return;
}
# basic syntax validation
:set ValidateSyntax do={
:local Code [ :tostr $1 ];

View file

@ -242,7 +242,6 @@
:global FetchUserAgentStr;
:global LogPrint;
:global UrlEncode;
:global MatrixAccessToken;
:global MatrixHomeServer;
@ -251,8 +250,8 @@
:onerror Err {
/tool/fetch check-certificate=yes-without-crl output=none \
http-header-field=({ [ $FetchUserAgentStr $0 ] }) http-method=post http-data="" \
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ $UrlEncode $MatrixRoom ] . \
"/join?access_token=" . [ $UrlEncode $MatrixAccessToken ]) as-value;
("https://" . $MatrixHomeServer . "/_matrix/client/r0/rooms/" . [ :convert to=url $MatrixRoom ] . \
"/join?access_token=" . [ :convert to=url $MatrixAccessToken ]) as-value;
$LogPrint debug $0 ("Joined the room.");
} do={
$LogPrint error $0 ("Failed joining the room: " . $Err);

View file

@ -80,7 +80,6 @@
:global IfThenElse;
:global LogPrint;
:global SymbolForNotification;
:global UrlEncode;
:local Server [ $EitherOr ($NtfyServerOverride->($Notification->"origin")) $NtfyServer ];
:local User [ $EitherOr ($NtfyServerUserOverride->($Notification->"origin")) $NtfyServerUser ];
@ -92,7 +91,7 @@
:return false;
}
:local Url ("https://" . $Server . "/" . [ $UrlEncode $Topic ]);
:local Url ("https://" . $Server . "/" . [ :convert to=url $Topic ]);
:local Headers ({ [ $FetchUserAgentStr ($Notification->"origin") ]; \
("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \
("Title: " . "[" . $IdentityExtra . $Identity . "] " . ($Notification->"subject")) });

View file

@ -126,7 +126,6 @@
:global LogPrint;
:global ProtocolStrip;
:global SymbolForNotification;
:global UrlEncode;
:local EscapeMD do={
:local Text [ :tostr $1 ];
@ -203,7 +202,7 @@
}
:local Data ([ /tool/fetch check-certificate=yes-without-crl output=user http-method=post \
("https://api.telegram.org/bot" . $TokenId . "/sendMessage") \
http-data=($HTTPData . "&text=" . [ $UrlEncode $Text ]) as-value ]->"data");
http-data=($HTTPData . "&text=" . [ :convert to=url $Text ]) as-value ]->"data");
:set ($TelegramMessageIDs->[ :tostr ([ :deserialize from=json value=$Data ]->"result"->"message_id") ]) 1;
} do={
$LogPrint info $0 ("Failed sending Telegram notification: " . $Err . " - Queuing...");
@ -215,7 +214,7 @@
[ $EscapeMD ("This message was queued since _" . [ /system/clock/get date ] . \
" " . [ /system/clock/get time ] . "_ and may be obsolete.") "plain" "_" ]);
:set ($TelegramQueue->[ :len $TelegramQueue ]) { tokenid=$TokenId;
http-data=($HTTPData . "&text=" . [ $UrlEncode $Text ]) };
http-data=($HTTPData . "&text=" . [ :convert to=url $Text ]) };
:if ([ :len [ /system/scheduler/find where name="_FlushTelegramQueue" ] ] = 0) do={
/system/scheduler/add name="_FlushTelegramQueue" interval=1m start-time=startup \
on-event=(":global FlushTelegramQueue; \$FlushTelegramQueue;");