mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
global-functions: introduce and use $SymbolForNotification
This commit is contained in:
parent
0e7b2d3ac7
commit
075859c898
9 changed files with 35 additions and 18 deletions
|
@ -8,7 +8,7 @@
|
|||
# https://git.eworm.de/cgit/routeros-scripts/about/
|
||||
|
||||
# expected configuration version
|
||||
:global ExpectedConfigVersion 23;
|
||||
:global ExpectedConfigVersion 24;
|
||||
|
||||
# global variables not to be changed by user
|
||||
:global GlobalFunctionsReady false;
|
||||
|
@ -41,6 +41,7 @@
|
|||
:global SendNotification;
|
||||
:global SendTelegram;
|
||||
:global SymbolByUnicodeName;
|
||||
:global SymbolForNotification;
|
||||
:global TimeIsSync;
|
||||
:global UrlEncode;
|
||||
:global VersionToNum;
|
||||
|
@ -747,6 +748,18 @@
|
|||
:return ($Symbols->$1);
|
||||
}
|
||||
|
||||
# return symbol for notification
|
||||
:set SymbolForNotification do={
|
||||
:global NotificationsWithSymbols;
|
||||
|
||||
:global SymbolByUnicodeName;
|
||||
|
||||
:if ($NotificationsWithSymbols != true) do={
|
||||
:return "";
|
||||
}
|
||||
:return ([ $SymbolByUnicodeName $1 ] . " ");
|
||||
}
|
||||
|
||||
# check if system time is sync
|
||||
:set TimeIsSync do={
|
||||
:if ([ / system ntp client get enabled ] = true) do={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue